Thanks ..
Ok i used the array method
$filter = array("!", "@", "#", "$", "%", "", "&", "", "", "(");
$trimmedKeyword = str_replace($filter, "", "$trimmedKeyword");
but i was unable to filter these two characters
\ and "
why is it so?
Another thing is if i were to type Crack !@#$
how should i display only Crack without !@#$ when i echo the value
<? echo $keyword; ?>
$Keyword = (isset($_GET['Keyword'])) ? $_GET['Keyword'] : '';
$trimmedKeyword = trim($Keyword);
$trimmedKeyword = stripslashes($trimmedKeyword);
$trimmedKeyword = str_replace('"', '', $trimmedKeyword);
//trim whitespace from the stored variable
$trimmedKeyword = preg_replace('#\s+#',' ',$trimmedKeyword);
$trimmed_arrayKeyword = explode(" ",$trimmedKeyword);