I have a < ul > with some < li >(s). I want to count the number of these < li>s on server side. And if this number qualifies a given condition then i would like to add some more < li> elements to this < ul>. Can someone please help me with this ?
Share
Use PHP’s DOM library, or look up Simple DOM Parser. They both have everything you need for manipulating and searching HTML to the extent of your question