jamesp0tter
Programmer
well, i have a .php page that transforms a string into something more usefull (forum like) like:
$str = "ehehehhe
";
$finalstr = "ehehehhe <img src=\"p.gif\">";
well, then i have the & [url] tags, that allow to put images and links. now imagine a pic has the name "something:p.gif".. that'll mess the whole thing up :\\i would come out with an output like
<img src="something<img src="p.gif">.gif">
how can i go around this ?... :(
i use the following code:
$msg = preg_replace("'\[img](.*?)\[/img\]'si", "<img src=\" $msg);
$msg = preg_replace("'\[url\](.*?)\[/url\]'si", "<a href=\" target=\"blank\">\$1</a>", $msg);
$msg = preg_replace("'
'si","<img width=15 height=15 border=0 src=\"images/smilies/P.gif\">", $msg);
if you need anything else to help solve the problem, i'll be happy to post it
tkx in advance !
$str = "ehehehhe
$finalstr = "ehehehhe <img src=\"p.gif\">";
well, then i have the & [url] tags, that allow to put images and links. now imagine a pic has the name "something:p.gif".. that'll mess the whole thing up :\\i would come out with an output like
<img src="something<img src="p.gif">.gif">
how can i go around this ?... :(
i use the following code:
$msg = preg_replace("'\[img](.*?)\[/img\]'si", "<img src=\" $msg);
$msg = preg_replace("'\[url\](.*?)\[/url\]'si", "<a href=\" target=\"blank\">\$1</a>", $msg);
$msg = preg_replace("'
if you need anything else to help solve the problem, i'll be happy to post it
tkx in advance !