Parse message?
#1
How can I show some code in the middle of the message? Not at the end nor at the beginning but in the middle?
Reply
#2
Is there a specific pattern you are searching the post for? Knowing what kind of condition you are trying to achieve will make it easier for us to help you.
Reply
#3
Considering you're talking about $post['message']:
$l = my_strlen($post['message']);
$half = $l / 2;
$part1 = my_substr($post['message'], 0, $half);
$part2 = my_substr($post['message'], half);
$post['message'] = $part1.' I am in the middle '.$part2;

Of course this may break MyCodes and stuff, so you'll have to add additional checks for that.
Reply
#4
Thanks @dragonexpert,

@Destroy666 outstanding buddy! Big thanks! Oh yeah and +1
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)