I was trying to take out swear words from a string and thought I had it done, until someone on this site showed me this: http://codepad.org/LMuhFH4g
So, is there any way I can go over a string until its clean of all swear words.
$a = array( 'duck', 'chit', 'dsshole' ); 
$str = 'duchitck-you-dssduckhole'; 
$newString = str_ireplace($a,'',$str); 
$newString = str_ireplace('-','',$newString); 
$newString = trim($newString); 
echo $newString;  
 
     
     
     
     
     
     
     
    