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 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. Link to comment https://forums.phpfreaks.com/topic/68301-solved-str_replace/#findComment-343410 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.