1
matecool
Smarty, multidimentional array problem
  • 2004/9/8 5:22

  • matecool

  • Just popping in

  • Posts: 1

  • Since: 2004/9/8 5


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

Login

Who's Online

466 user(s) are online (351 user(s) are browsing Support Forums)


Members: 0


Guests: 466


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits