I'm trying to use str_replace to ignore sertain characters from a recordset field and it seems I am having difficulties with ignoring commas and carriage returns. I've gotten the following but when searching for, let's say, New York. When York is at the end of a sentence from a recordset field it is skipped and if it has a comma like York, it is skipped. Any ideas? Here's the code I'm using so far
//IGNORED CHARACTERS $replacement = array("\"", "\,", ".", "!", "?"); //CREATE THE ARRAY OF WORDS //STRIP SLASHES, IGNORE CAPS, IGNORE REPLACEMET CHARACTERS //$keywords = form field value $words=explode(" ", stripslashes(strtolower(str_replace($replacement, "", $keywords)))); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php