|
Posted by Gary Smith on 10/13/05 00:57
Aloha All,
I'm trying to figure out how to put a multidimensional array into columns
and rows like so. I looked at the tutorial at
http://smarty.incutio.com/?page=SmartyColumnsTutorial but I couldn't figure
out how to make it work with multidimensional arrays.
$test[] = array("Um","One");
$test[] = array("Dois","Two");
$test[] = array("Tres","Three");
$test[] = array("Quatro","Four");
$test[] = array("Cinco","Five");
$test[] = array("Seis","Six");
$test[] = array("Sete","Seven");
<table border="0" cellspacing="0" cellpadding="0">
These two rows repeat for every three items
This is test[key][0]
<tr align="left" valign="top">
<td>Spanish Column 1 ( test[0][0] )</td>
<td>Spanish Column 2 ( test[1][0] )</td>
<td>Spanish Column 3 ( test[2][0] )</td>
</tr>
This is test[key][1]
<tr align="left" valign="top">
<td>English Column 1 ( test[0][1] )</td>
<td>English Column 2 ( test[1][1] )</td>
<td>English Column 3 ( test[2][1] )</td>
</tr>
</table>
Thanks,
Gary
Navigation:
[Reply to this message]
|