Hi, I have this code he replace a word in a string Ex: "http://www.xxx.com" the result are "xxx" Ex: "try for sex" the result are "try for" But I need to replace all string containing that word. Ex: "http://www.xxx.com" the result are "" Ex: "try for sex" the result are "" $placeholder = array('http', '//', ':', 'sex', 'index.php', '#', '£', 'https', '.com','www.','www','/'); $replacement = array(''); $display = str_replace($placeholder, $replacement, $_GET['q']); mysql_query("INSERT INTO sh SET tags='$display'") or die(mysql_error()); Code (markup): Could you help me please? Thank you
$placeholder = array('http', '//', ':', 'sex', 'index.php', '#', '£', 'https', '.com','www.','www','/'); $replacement = ''; $display = str_replace($placeholder, $replacement, $_GET['q']); mysql_query("INSERT INTO sh SET tags='$display'") or die(mysql_error()); Code (markup): Enjoy!