jaymo Posted April 22, 2012 Share Posted April 22, 2012 Im not sure how to go about this, I go into the bbcode and want to add another one for the tags maybe like this $text = preg_replace("/\[user\](.+?)\[\/user\]/", userBar("$1"), $text); I have a function that created a userbar based on the id of the user they specify in the classes but I don't know how to get what they typed in between the tags and input it into a function?? Am I making any sense? Or could someone guide me on how to can use userbars in my game. Thanks very much. Quote Link to comment Share on other sites More sharing options...
Djkanna Posted April 22, 2012 Share Posted April 22, 2012 Maybe? [PHP] $text = preg_replace_callback('#\@([0-9]+)\#', 'userBar', $text); [/PHP] Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.