Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> smarty i foreach
kajtek2008
post 10.11.2012, 10:16:51
Post #1





Grupa: Zarejestrowani
Postów: 69
Pomógł: 0
Dołączył: 15.08.2009
Skąd: Nowy Sącz

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


Kod
Array
(
    [0] => Array
        (
            [id] => 1
            [tytul] => Biznes
            [status] => 2
            [meta_desc] =>
            [sub] => Array
                (
                    [0] => Array
                        (
                            [id] => 6
                            [id_kat] => 1
                            [tytul] => Praca
                            [status] => 2
                            [meta_desc] =>
                        )

                )

        )

    [1] => Array
        (
            [id] => 2
            [tytul] => Ekonomia
            [status] => 2
            [meta_desc] =>
        )

    [2] => Array
        (
            [id] => 3
            [tytul] => Internet i komputery
            [status] => 2
            [meta_desc] =>
            [sub] => Array
                (
                    [0] => Array
                        (
                            [id] => 1
                            [id_kat] => 3
                            [tytul] => Programy
                            [status] => 2
                            [meta_desc] =>
                        )

                    [1] => Array
                        (
                            [id] => 2
                            [id_kat] => 3
                            [tytul] => Grafika
                            [status] => 2
                            [meta_desc] =>
                        )

                )

        )

)





Mam problem z wyciągnięciem drzewka


Biznes:
-Praca
Ekonomia:
Internet i komputery:
-Programy
-Grafika


Próbowałem przez foreach w foreach ale dalej wyskakuje ze jest tablica

sub:array
Go to the top of the page
+Quote Post

Posty w temacie


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

 



RSS Wersja Lo-Fi Aktualny czas: 14.08.2025 - 10:14