PHP Count how many times a specific word shows up in h3 tag
<p>I need to be able to count how many times a specific word shows up in a specific html tag. Currently I have only been able to count the total number of words that show up in a tag. And I can count how many times the word shows up total in the document, but I cant figure out how to count how many times a word shows up just in the h3 tag for example.</p>

<p>Example of what I need:</p>

<pre><code>Sample text here, blah blah blah, lorem ipsum
&lt;h3&gt;Lorem is in this h3 tag, lorem.&lt;/h3&gt;
lorem ipsum dolor....
&lt;h3&gt;This is another h2 with lorem in it&lt;/h3&gt;
</code></pre>

<p>So as you see the word "lorem" is in that code 4 times, but I only want to count how many times the word "lorem" shows up in the h3 tag's. </p>

<p>I would prefer to keep using PHP on this project.</p>

<p>Thank you very much for your help</p>
