title: Similar Text php mysql
body: <p>i have the following code that when i search for a word it shows me a did you mean.  the issue is if i type in "clin" i want it to return clinicals but it returns "reschedule"  </p>
  
  <pre><code>$my_word = $_POST['value'];
  $bestMatch = array('word' = &gt; $my_word, 'match' = &gt; 2);
  $result = mysql_query("SELECT keyword FROM athena");
  $storeArray = Array();
  while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
      similar_text($row['keyword'], $my_word, $percent);
      if ($percent &gt; $bestMatch['match'])
         $bestMatch = array('word' = &gt; $row['keyword'], 'match' = &gt; $percent);
  }
  if ($bestMatch['match'] &lt; 70)
     echo 'Did you mean: &lt;strong&gt;'.$bestMatch['word'].'&lt;/strong&gt;';
  </code></pre>