1
Hi you there!
I am a newbb with smarty, but I have been coding php for years. I was trying to loop my array to a smarty template, but without success.
I have an array that look like the following.
Array
(
[0] => Array
(
[0] => Array
(
[average] => 0
[date] => 30.08.2004
[filled] => 0
[next] => 0
[prev] => 0
[fu] => 0
)
[1] => Array
(
[average] => 0
[date] => 31.08.2004
[filled] => 0
[next] => 0
[prev] => 0
[fu] => 0
)
[2] => Array
(
[average] => 0
[date] => 01.09.2004
[filled] => 0
[next] => 0
[prev] => 0
[fu] => 0
)
[3] => Array
(
[average] => 0
[date] => 02.09.2004
[filled] => 0
[next] => 0
[prev] => 0
[fu] => 0
)
[1] => Array
(
[0] => Array
(
[average] => 0
[date] => 06.09.2004
[filled] => 0
[next] => 0
[prev] => 0
[fu] => 4
)
[1] => Array
(
[average] => 0
[date] => 07.09.2004
[filled] => 0
[next] => 0
[prev] => 0
[fu] => 5
)
[2] => Array
(
[average] => 0
[date] => 08.09.2004
[filled] => 0
[next] => 0
[prev] => 0
[fu] => 6
)
[3] => Array
(
[average] => 0
[date] => 09.09.2004
[filled] => 0
[next] => 0
[prev] => 0
[fu] => 7
) etc....
Well, I have understood that with smarty you can loop the array by asigning the key of an array as a variable
{section name=mydata loop=$custid}, but.. what happend when my key is a number, there is no variable to loop with, and can I loop these kind of things in smarty? Thanks allready for the help, clear code examples will be very welcome!
matecool