For example, I want to take the user string:
and find and remove any of the following with the case not being a factor:You are so dumb that I .......
So after I run the user's sentence through it will strip out the "You are so" part and just give meyou are so
you're so
your so
I did get this partially working, but it only matches items of the same exact case:dumb that I ......
Code: Select all
while ($row = mysql_fetch_array($result))
$needlesї] = $rowї'phrase'];
foreach ($needles as $needle)
{
// echo "<BR>Searching "$data" for "$needle".";
$data = str_replace( ($needle." "), "", $data);
}Thanks,
Paul