Hi
Let's say that I have this text my db.
<P>word1</P>
<P>word2</P>
<P>word3</P>
<P>word4</P>
How I can detect the number of <p>
elements after I get my text from my db?
Thanks
Hi
Let's say that I have this text my db.
<P>word1</P>
<P>word2</P>
<P>word3</P>
<P>word4</P>
How I can detect the number of <p>
elements after I get my text from my db?
Thanks
Use the Simple HTML DOM parser for PHP to parse the contents of the text, select all 'p' elements, then count the size of the resulting array.