ted_chou12 Posted December 14, 2006 Share Posted December 14, 2006 I cant seem to find the difference between the two, which one should i choose for replacing submit form messages?(I am using the replace function to replace smiliey codes with <img> pictures) Quote Link to comment Share on other sites More sharing options...
boby Posted December 14, 2006 Share Posted December 14, 2006 [url=http://www.php.net/manual/en/function.ereg-replace.php]ereg_replace[/url] = [i]Replace regular expression[/i][url=http://www.php.net/manual/en/function.str-replace.php]str_replace[/url] = [i]Replace all occurrences of the search string with the replacement string[/i]If you know the exact submit messages (strings), I suggest to use [i]str_replace[/i], but if you need regular expression to determine messages, go for [url=http://www.php.net/manual/en/function.preg-replace.php]preg_replace[/url] instead of [i]ereg_replace[/i].Boby Quote Link to comment Share on other sites More sharing options...
ted_chou12 Posted December 14, 2006 Author Share Posted December 14, 2006 thankyou!!! :D Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.