title: substr_count within array
body: <p>I am trying to search for a keyword within strong tags. </p>
  
  <p>I have produced an array for the tags which displays as:</p>
  
  <pre><code>        Array
          (
          [0] =&gt; Array
          (
          [0] =&gt;  seo agency in london
          [1] =&gt; seo agency in london
          [2] =&gt; seo consultant in london
          [3] =&gt; seo consultant in london
          [4] =&gt; seo experts in london
          )
  
          [1] =&gt; Array
          (
          [0] =&gt;  seo agency in london
          [1] =&gt; seo agency in london
          [2] =&gt; seo consultant in london
          [3] =&gt; seo consultant in london
          [4] =&gt; seo experts in london
          )
  
          )
  </code></pre>
  
  <p>And I want to search for the keyword which in this case is "seo"</p>
  
  <p>I am using:</p>
  
  <pre><code>function substr_count_array( $haystack, $needle ) {
  $count = 0;
  foreach ($needle as $substring) {
  $count += substr_count( $haystack, $substring);
  }
  return $count;
  }
  $matchPattern7 = '/&lt;strong(?:"(?:[^\\\"]|\\\.)*"|\'(?:[^\\\\\']|\\\.)*\'|[^\'"&gt;])*&gt;(.*?)&lt;\/strong&gt;/';
  preg_match_all($matchPattern7, $content, $foundIt7);
  echo substr_count_array(strtolower($foundIt7), strtolower($keyword));
  </code></pre>
  
  <p>For reference..</p>
  
  <p>$keyword = seo</p>
  
  <p>I am getting zero, can anyone help? Thanks</p>