[SMARTY] Multidimensional array in columns and rows

Gary Smith <[email protected]>
Newsgroups gmane.comp.php.smarty.general
Message-ID <BF72AAA5.56800%[email protected]>
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

-- 
Smarty General Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.