title: compare two name string php
body: <p>I am having a problem with comparing name strings.
  I have 3 variables </p>
  
  <pre><code>$fullname  = 'MASNAD HOSSAIN NEHITH';
  $firstName = 'Masnad';
  $LastName  = 'Nehith';
  
  $fullname2  = 'MÄSNAD HOSSAIN NEHITH';
  $firstName2 = 'Mäsnad';
  $LastName2  = 'Nehith';
  </code></pre>
  
  <p>I thought of using <code>strpos</code> to see if the first name exists in the full name, but <code>strpos</code> is case sensitive. </p>
  
  <p>I tried regular expressions using pregmatch but I am not sure how it works.</p>
  
  <pre><code>$pregmatch = preg_match("/$fullname/", $firstName);
  if($pregmatch){
     echo " it matches";
   }
  $pregmatch2 = preg_match("/$fullname2/", $firstName2);
  if($pregmatch2){
     echo " it matches";
   }
  </code></pre>