Hi all, Im in the proccess of coding my own private message system and then hopefully some web forums.
Right now ive got most the private message system done but im trying to add in my own MARKUP tags
So far single ones work fine, like [smile] to a smily face, what I dont know how to do is make SOMETHING know how to grab whats between them.
Im using this so far:
function parse_text ($string) {
$string = str_replace("[cool]","<img src='images/emoticons/cool.gif'>","$string");
$string = str_replace("[grin]","<img src='images/emoticons/grin.gif'>","$string");
$string = str_replace("[frown]","<img src='images/emoticons/frown.gif'>","$string");
$string = str_replace("[shock]","<img src='images/emoticons/shock.gif'>","$string");
$string = str_replace("[smile]","<img src='images/emoticons/smile.gif'>","$string");
$string = str_replace("[tongue]","<img src='images/emoticons/tongue.gif'>","$string");
$string = str_replace("[wink]","<img src='images/emoticons/wink.gif'>","$string");
return "$string";
}
any help would be appreciated!!!