Jump to content

str functions


supanoob

Recommended Posts

well i have a function to change [ & ] to < & > but it doesnt seem to change the [/ & ] part at the end of the code. this is the function:

[code]function tml ($topbody) { $topbody=htmlspecialchars($topbody); $topbody=str_replace('[b]','<b>',$topbody); return nl2br($topbody); }
[/code]

and whenever i type [ b] it works but whenever i put [/ b] it doesnt :S
Link to comment
https://forums.phpfreaks.com/topic/15531-str-functions/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.