Multidimensional array in columns and rows

From: Date: Wed, 12 Oct 2005 21:57:25 +0000
Subject: Multidimensional array in columns and rows
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-13078@lists.php.net to get a copy of this message
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

« previous php.smarty.general (#13078) next »