Hi,
I want to print an array which contains about 50 elements into an HTML table with 4 columns.
Obviously with my current code, I simply print everything on the same row.
I guess I would have to loop a string to define the record number and etc...
Any help or guidance would be appreciated...
I want to print an array which contains about 50 elements into an HTML table with 4 columns.
Obviously with my current code, I simply print everything on the same row.
I guess I would have to loop a string to define the record number and etc...
Any help or guidance would be appreciated...
Code:
<table cellpadding="0" cellspacing="0" border"0">
<tr>
foreach ($Pages as $key=>$Page) {
print "<td>$Page['Title']</td>";
}
</tr>
</table>
[code]
$Pages = array(
"50" => array (
"Title" => "some text 50",
"Desc" => "some text",
"Content" => "some text" ),
"51" => array (
"Title" => "some text 51",
"Desc" => "some text",
"Content" => "some text" ),
"52" => array (
"Title" => "some text 52",
"Desc" => "some text",
"Content" => "some text" ),
"53" => array (
"Title" => "some text 53",
"Desc" => "some text",
"Content" => "some text" ),
);