Guernica Posted May 22, 2008 Share Posted May 22, 2008 On the page that displays the description of a download, I have this: include('./include/smilies.php'); $str = preg_replace($smileysearch, $smileyreplace, $str); smilies.php just has the two arrays. They are like this: $smileysearch = array( "", ); $smileyreplace = array( "<img src='images/smilies/1.gif' border='0' />", ); This displays an error of "No ending delimiter" I believe. What does this mean? I assume it has to do with the "" I have but I don't understand what's wrong with that. Please help! TY! Link to comment https://forums.phpfreaks.com/topic/106817-smilies-preg_replace/ Share on other sites More sharing options...
effigy Posted May 22, 2008 Share Posted May 22, 2008 PREG patterns require delimiters, e.g., /:)/. You'd probably be better off with str_replace in this case. Link to comment https://forums.phpfreaks.com/topic/106817-smilies-preg_replace/#findComment-547594 Share on other sites More sharing options...
Guernica Posted May 22, 2008 Author Share Posted May 22, 2008 Okay, I guess I will use str_replace. Someone told me to use preg_replace for it at one time so I just went with that. =/ Thanks! Link to comment https://forums.phpfreaks.com/topic/106817-smilies-preg_replace/#findComment-547637 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.