|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
sabbacus Smarty n00b
Joined: 06 Aug 2003 Posts: 2
|
Posted: Thu Aug 07, 2003 2:29 pm Post subject: how to print an array of image filenames? |
|
|
I have an multi-dimensional array that i want to print using smarty. However there are problems:
I tried to prins using html_table. The problem there is that it is limited to just printing the array value (resulting in printing "Array"). I also tried using the section function. It works but i cannot print a table since i cannot retrive the $key (the values 0-6 below) and use the modulus function to set the number of columns in the table to be printed.
So... Does anyone know how to print the values in into a table using smarty?
/M
The array (part of it anyway) :
Array
(
[0] => Array
(
[id] => 106
[filename] => Overallis2002_072.jpg
[comment] => Tragik
)
[1] => Array
(
[id] => 107
[filename] => Overallis2002_073.jpg
[comment] =>
)
[2] => Array
(
[id] => 108
[filename] => Overallis2002_074.jpg
[comment] => luuuuv
)
[3] => Array
(
[id] => 109
[filename] => Overallis2002_076.jpg
[comment] => Vem h&nglar upp vem?
)
[4] => Array
(
[id] => 110
[filename] => Overallis2002_077.jpg
[comment] =>
)
[5] => Array
(
[id] => 111
[filename] => Overallis2002_081.jpg
[comment] => Rosa pantern
)
[6] => Array
(
[id] => 112
[filename] => Overallis2002_082.jpg
[comment] =>
)
) |
|
Back to top |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
|
Back to top |
|
sabbacus Smarty n00b
Joined: 06 Aug 2003 Posts: 2
|
Posted: Thu Aug 07, 2003 3:29 pm Post subject: |
|
|
messju wrote: | http://smarty.php.net/contribs/examples/dynamic_table_columns/table.tpl.txt |
Worked flawlessly.
Thank you |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|