dear all,
i have tried to use preg_replace() to do some replacements but there are showing warnings and it seems doesn't work, my code is like below:
$patterns = array ("\s$","(😃)+$","(😕)+$","(🆒)+$","(:eek🙂+$","(:frown🙂+$","(:mad🙂+$","(:redface🙂+$","(:rolleyes🙂+$","(:))+$","^(:p)+$","^(;))+$");
$replacements = array("<br>",
"<img src='/public_html/icon/biggrin.gif' style='width:20 heigh:20' border='0'>",
"<img src='/public_html/icon/confused.gif' style='width:20 heigh:20' border='0'>",
"<img src='/public_html/icon/cool.gif' style='width:20 heigh:20' border='0'>",
"<img src='/public_html/icon/eek.gif' style='width:20 heigh:20' border='0'>",
"<img src='/public_html/icon/frown.gif' style='width:20 heigh:20' border='0'>",
"<img src='/public_html/icon/mad.gif' style='width:20 heigh:20' border='0'>",
"<img src='/public_html/icon/redface.gif' style='width:20 heigh:20' border='0'>",
"<img src='/public_html/icon/rolleyes.gif' style='width:20 heigh:20' border='0'>",
"<img src='/public_html/icon/smile.gif' style='width:20 heigh:20' border='0'>",
"<img src='/public_html/icon/tongue.gif' style='width:20 heigh:20' border='0'>",
"<img src='/public_html/icon/wink.gif' style='width:20 heigh:20' border='0'>");
$threadmesg = preg_replace($patterns, $replacements, $crow
[contents]);
when i execute the page it shows 12 warnings like this and the preg_replace seem doesn't work:
Warning: No ending delimiter found in c:\Apache Group\Apache\htdocs/public_html/forumthrep.php on line 60
is there any problems with my code??? pls help...
thanks & regards,
pf