Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.
foreach array

 
Post new topic   Reply to topic    Smarty Forum Index -> Language: Polish
View previous topic :: View next topic  
Author Message
kajtek
Smarty n00b


Joined: 10 Nov 2012
Posts: 4
Location: Poland

PostPosted: Sat Nov 10, 2012 9:14 am    Post subject: foreach array Reply with quote

Code:
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
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> Language: Polish All times are GMT
Page 1 of 1

 
Jump to:  
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
Protected by Anti-Spam ACP