title: How to search in multi dimensional array
body: <p>i have multi dimension arrays in which i want to look for some particular words
  this is how my array looks like</p>
  
  <pre><code>Array
  (
      [0] =&gt; Array
          (
              [sch_name] =&gt; Montfort School Roorkee
              [sch_degree] =&gt; High School
              [sch_field] =&gt; Commerce
              [sch_grade] =&gt; A+
              [sch_from_year] =&gt; 2007
              [sch_to_year] =&gt; 2015
              [sch_desc] =&gt; Montfort School was very nice
          )
  
      [1] =&gt; Array
          (
              [sch_name] =&gt; City Public
              [sch_degree] =&gt; 12
              [sch_field] =&gt; Commerce
              [sch_grade] =&gt; 12
              [sch_from_year] =&gt; 2007
              [sch_to_year] =&gt; 2015
              [sch_desc] =&gt; Great School
          )
  
  )
  </code></pre>
  
  <p>Now suppose i want to find 'montfort' word in this multi dimensional array </p>
  
  <p>So i tried using this function</p>
  
  <pre><code>function searchForWord($id, $array) {
     foreach ($array as $key =&gt; $val) {
         if ($val['sch_name'] === $id) {
             return $key;
         }
     }
     return null;
  }
  echo $id = searchForWord('montfort', $p);
  </code></pre>
  
  <p>it resulted in nothing but when i wrote 'Montfort School Roorkee' result was found, why these word are so sensitive is there any other way to get values</p>
  
  <p>can't i use something like we do in mysql query Like %keyword</p>