DJTim666 Posted September 7, 2007 Share Posted September 7, 2007 I am just wondering if it is possible to use str_replace(); to replace 2 variables before updating a database. e.g; <?php $post = $_POST['something']; $post2 = $_POST['something_else']; $string = array("hello"); $replace_string = array("hi"); str_replace($string, $replace_string, $post, $post2); ?> Will this work? -- DJ Quote Link to comment https://forums.phpfreaks.com/topic/68301-solved-str_replace/ Share on other sites More sharing options...
DJTim666 Posted September 7, 2007 Author Share Posted September 7, 2007 Apparently the forth variable counts the number of replacements. Topic solved. Quote Link to comment https://forums.phpfreaks.com/topic/68301-solved-str_replace/#findComment-343410 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.