Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Smarty - wyswietlanie zagnieżdzonych tablic.
grzegorz-gg
post
Post #1





Grupa: Zarejestrowani
Postów: 94
Pomógł: 0
Dołączył: 25.12.2004

Ostrzeżenie: (0%)
-----


Jak przy pomocy szablonów smarty wyswietlic taka tablice?

  1. <?php
  2. $tab = array(array(array("phone" => "1", "fax" => "11"), array("phone" => "2", "fax" => "22"), array("phone" => "3", "fax" => "33")),
  3. array(array("phone" => "555-4444", "fax" => "aa"), array("phone" => "666-5555", "fax" => "bb"), array("phone" => "777-6666", "fax" => "cc")));
  4.  
  5. $objSmarty->assign("tab", $tab);
  6. ?>



zrobilem to tak ale nie dziala

  1. {section name=x loop=$tab}
  2. {section name=y loop=$tab1[x]}
  3. {section name=z loop=$tab2[x][y]}
  4. {$tab2[x][y][z].phone}
  5. {/section}
  6. {/section}
  7. {/section}


Ten post edytował grzegorz-gg 22.06.2006, 19:42:34
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 25.08.2025 - 13:38