PHP / HTML - re organize array

lawgamer

New Member
I have a array with ID values like this \[code\][2,34,7,46,16,19 ...]\[/code\] etceach ID points to more data which I display with html like:\[code\]<ul> <li> content from 2 content from 34 content from 7 </li> <li> content from 46 content from 16 content from 19 </li> ...\[/code\]notice that in this case there are 3 entries into each list item.How can share entries from the array to each \[code\]<li>\[/code\] in a such way that there are always exactly 5 list items?for eg, if the array has 15 items, each \[code\]<li>\[/code\] has 3 items, or if array has 9 items, each \[code\]<li>\[/code\] has at least 1 entry (4 of them will have 2)
 
Back
Top