I have a simple search engine and I'm trying to detect certain words in a string with something like this:
Code: Select all
$sql = "SELECT * FROM table_links WHERE title like('%" . $search . "%')";
but somehow anything in the database that is a foreign character or html symbol like "»" seems to find its way into the results even if the title doesn't contain the $search phrase. Does anyone know a method to strip all those things from the text before it gets to my query? Any help would be appreciated. Thanks.