quickstopman Posted May 28, 2007 Share Posted May 28, 2007 hey guys im trying to make it when my user updates his profile it turns JS, and PHP statements into useless dots can someone write me and example script thanks guy! Link to comment https://forums.phpfreaks.com/topic/53228-solved-simple-str_replace-help/ Share on other sites More sharing options...
StormTheGates Posted May 28, 2007 Share Posted May 28, 2007 Heres something I cooked up: <?php $something = $_POST['quote']; $replace = array("javascript", "html", "body"); $replaced = str_replace($replace, "...", "$something"); echo "$replaced"; ?> Should work fine. Just add array elements to $replace with words you want to be replaced. Link to comment https://forums.phpfreaks.com/topic/53228-solved-simple-str_replace-help/#findComment-263006 Share on other sites More sharing options...
quickstopman Posted May 28, 2007 Author Share Posted May 28, 2007 thanks! Link to comment https://forums.phpfreaks.com/topic/53228-solved-simple-str_replace-help/#findComment-263007 Share on other sites More sharing options...
StormTheGates Posted May 28, 2007 Share Posted May 28, 2007 My pleasure. Link to comment https://forums.phpfreaks.com/topic/53228-solved-simple-str_replace-help/#findComment-263011 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.