Ver Mensaje Individual
  #1 (permalink)  
Antiguo 07/05/2015, 16:20
Avatar de zerokull
zerokull
 
Fecha de Ingreso: noviembre-2009
Mensajes: 153
Antigüedad: 15 años
Puntos: 1
menu con array recursivo

Hola tengo el siguiente arreglo:

Código PHP:
Array
(
    [
name] => animales
    
[sub] => Array
        (
            [
0] => Array
                (
                    [
name] => invertebrados
                    
[sub] => Array
                        (
                            [
0] => Array
                                (
                                    [
name] => moluscos
                                    
[leaf] => 1
                                
)

                            [
1] => Array
                                (
                                    [
name] => insectos
                                    
[sub] => Array
                                        (
                                            [
0] => Array
                                                (
                                                    [
name] => mantis
                                                    
[leaf] => 1
                                                
)

                                        )

                                )

                        )

                )

            [
1] => Array
                (
                    [
name] => vertebrados
                    
[sub] => Array
                        (
                            [
0] => Array
                                (
                                    [
name] => mamiferos
                                    
[sub] => Array
                                        (
                                            [
0] => Array
                                                (
                                                    [
name] => tigre
                                                    
[leaf] => 1
                                                
)

                                            [
1] => Array
                                                (
                                                    [
name] => caballo
                                                    
[leaf] => 1
                                                
)

                                        )

                                )

                        )

                )

        )


pero quiero recorrer para formar un menú con html.
Ya lo pude recorrer con una función recursiva, el problema es a la hora de formar el html. Alguien me podría ayudar a formar el html (Listas)