//count no of words in the search words and store in a variable $noofSearchWords=count($searchWords);
$noofSearchWordsstores the number of search words. Later after searching search words in key word table we get results. There we can perform logical AND operation that will display our desired results. If
$noofSearchWordsis equal to number of records, the next part of the program gets executed. Else NO SEARCH RESULT FOUND is displayed.
//implode to an array
$arrWords = implode("' OR keyword='", $searchWords);
//get the key ids from the key table
$query = "select * from keytable where keyword='$arrWords'";
$kResult = mysql_query($query);