Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.
recorrer arreglos anidados

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


Joined: 29 Aug 2013
Posts: 1

PostPosted: Thu Aug 29, 2013 2:41 pm    Post subject: recorrer arreglos anidados Reply with quote

Hola tengo un inconveniente para recorrer un arreglo en varias dimensiones, este es el arreglo que quiero recorrer con smarty

array(3) {
[0]=>
array(8) {
["id"]=>
string(2) "19"
["pcat_nombre"]=>
string(10) "Accesorios"
["pcat_id_padre"]=>
string(1) "0"
["cat-hijo"]=>
array(1) {
[0]=>
array(8) {
["id"]=>
string(2) "28"
["pcat_nombre"]=>
string(13) "sub-menu"
["pcat_id_padre"]=>
string(2) "19"
["cat-hijo"]=>
array(1) {
[0]=>
array(8) {
["id"]=>
string(2) "29"
["pcat_nombre"]=>
string(18) "sub-sub-menu"
["pcat_id_padre"]=>
string(2) "28"
["cat-hijo"]=>
bool(false)
}
}
}
}
}
[1]=>
array(8) {
["id"]=>
string(2) "10"
["pcat_nombre"]=>
string(7) "Menu 2"
["pcat_id_padre"]=>
string(1) "0"
["cat-hijo"]=>
bool(false)
}
[2]=>
array(8) {
["id"]=>
string(2) "23"
["pcat_nombre"]=>
string(21) "Menu 3"
["pcat_id_padre"]=>
string(1) "0"
["cat-hijo"]=>
bool(false)
}

Alguien tiene idea como lo puedo recorrer para armar el menu?

Muchas Gracias
Back to top
View user's profile Send private message
Byakuya22
Smarty n00b


Joined: 05 Oct 2013
Posts: 1
Location: http://astropar.tk/

PostPosted: Sat Oct 05, 2013 10:11 pm    Post subject: Reply with quote

Найди себе пару на сайте Аstropar.tk
Back to top
View user's profile Send private message AIM Address Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> Language: Spanish 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