PDA

View Full Version : Strip vbbcode


Boofo
08-30-2002, 11:31 PM
Can anyone please tell me how to "strip'' vbbcode for a line? I know this line:

$buddy[usertitle]=bbcodeparse($buddy[usertitle]);

will parse it, but how can I strip it out of this altogether? Can it be done?

Admin
08-31-2002, 07:19 AM
Without diving into the editor and writing some regex's I think the best way would be to strip_tags() from the bbcodeparse()'ed code.

Boofo
08-31-2002, 07:39 AM
Oh, ok, I see now. If I have it in other areas of the site and I don't want it in this area, then I have to parse the code first and then strip it out. It worked great! Thank you very much, Chen. Here's the code I used:

$username = $buddy['username'];
$buddy[usertitle]=bbcodeparse($buddy[usertitle]);
$buddy[usertitle]=strip_tags($buddy[usertitle]);

Originally posted by FireFly
Without diving into the editor and writing some regex's I think the best way would be to strip_tags() from the bbcodeparse()'ed code.