I'm working on removing extra spaces between keyword the special characters below.
"~", "`", "\"" , "\" , "!", "@" , "$"
I did a filter on certain of them.
$filter = array("~", "`", "\"" , "\\" , "!", "@" , "$" , "%" , "^" , "&" , "*" , "(", ")" , "+" , "{" , "}" , "[" , "]" , "<" , ">" , "?" , "/" , "|" , "=");
The thing is when user does a search on "1mm Crack (&)",
the special characters get trimmed, leaving a extra spacing after the Keywords "1mm Crackspace"
So it is like "1mm Crack (&)" to "1mm Crack "
Is there any way i can trim the searched keywords to just "1mm Crack" if special characters were key in..
So i was thinking if it's possible to do a removing of extra whites spaces between the keyword and the special characters
Something like
$filter = array("~", "`", "\"" , "\\" , "!", "@" , "$" , "%" , "^" , "&" , "*" , "(", ")" , "+" , "{" , "}" , "[" , "]" , "<" , ">" , "?" , "/" , "|" , "=");
if(!empty($filter) {
$trimmedKeyword = str_replace($filter, '', $trimmedKeyword);
} // end if