You are here: Multidimensional array in columns and rows « Smarty Templates Posts « IT news, forums, messages
Multidimensional array in columns and rows

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация