I have a string in this form
$navigation="<li>A</li><li>B</li><li>C</li><li>A</li><li>B</li><li>C</li><li>A</li><li>B</li><li>C</li>";
The list is generated dynamically from database and hence the number of elements is not fixed. I want to split this list after every 5th element, so if there are 10 "<li></li>"
elements in this string I should get two strings output1 and output2.
I have tried explode but it doesn't work as we have to impose restriction on nth element and I have also tried string_split but that is not working also.
So what is the solution?
Ahmar