The code snippet given below explains every step of the program.
Searching keyword table for every word is a long process. This also reduces the efficiency of the program. To implement this
all the keywords in the keyword table is stored in an associative array $allWords. An associative array is one, which works
on B-Tree algorithm and very useful to perform searches. Here is the function.
$result = mysql_query( "select keyid, keyword from keytable" ) or die( "Error in executing mysql query" );