SQL result array into section
| From: | Timo Railo | Date: | Sun, 09 Feb 2003 09:38:03 +0000 |
| Subject: | SQL result array into section | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-7602@lists.php.net to get a copy of this message | ||
Hi everyone,
and sorry for starting with basics. I've been reading trough the list archives and been trying to get sections to work. Maybe it's the boozing on friday that affects my thinking, but I just can't seem to get this to work, please help.
I have a general SQL query class, which returns rows like this (I'm sending it to smarty with name $tablerows):
Array ( [0] => Array ( [0] => Timo [1] => Railo [2] => 0505002232 [3] => Tester )
[1] => Array ( [0] => poni [1] => puikkonen [2] => 012012012 [3] =>))I don't want to have arrays named, cause they are very general. I get the loop to go trough all the rows: {section name=outer loop=$tablerows} {/section} But I just can't get the inner section constructed properly. I've seen references on _multiple_ way of referencing (/ $ [] .) but none have worked for me. I just need to go trough (n) number of columns in each row, nothing fancier than that. Cheers and many thanks for replys, Timo -----------
Timo Railo Tel. +358 50 500 2232 T-Moby Consulting Ltd. Fax +358 50 8500 2232 Tekniikantie 14 timo@tmoby.com 02150 ESPOO www.tmoby.com Finland