title: Count number of <li> tags in a <ul> on serverside using PHP
body: <p>I have a &lt; ul > with some &lt; li >(s). I want to count the number of these &lt; li>s on server side. And if this number qualifies a given condition then i would like to add some more &lt; li> elements to this &lt; ul>. Can someone please help me with this ?</p>