How to split this array into three's and place it in <td> using php?

Posted by udaya on Stack Overflow See other posts from Stack Overflow or by udaya
Published on 2010-04-24T06:51:02Z Indexed on 2010/04/24 6:53 UTC
Read the original article Hit count: 125

Filed under:
|
|

Hi I have an php array of ten numbers

$arr = array("first" => "1", "second" =>"2", "Third" =>"3", "Fourth" =>"4",
"fifth" =>"5",, "sixth" =>"6", "seventh" =>"7", "eighth" =>"8", 
"ninth" =>"9","tenth"="10");

I have to place these values in a <td> by spliting the array in numbers of three such that my td contains first td contains <td>the first three values of an aray</td>
second td contains <td>the next three values of an aray</td>
third td contains <td>the next three values of an aray</td>
if the remaining values in less than three in number it must be in the another td say now i have tenth value so my last td must contain tenth value

© Stack Overflow or respective owner

Related posts about php

Related posts about array