Ver Mensaje Individual
  #4 (permalink)  
Antiguo 13/06/2012, 16:25
Avatar de Heiroon
Heiroon
 
Fecha de Ingreso: junio-2010
Ubicación: Caracas, Venezuela - Por ahora...
Mensajes: 495
Antigüedad: 13 años, 11 meses
Puntos: 63
De acuerdo Respuesta: Bucle que Recorre Array

Bueno... Esta parte la resolví efectivamente con un foreach simple.

Código PHP:
Ver original
  1. $evento = $registers[$i]["children"]["C1C_Mobile_c1c_mobile:eventos"];
  2.             $nXML = var_export($evento, true);
  3.  
  4.                 $id = $evento[0]["attributes"]["gml:id"];
  5.                 $cod_capa = explode("_", $id);
  6.            
  7.                 foreach ($evento[0]["children"] as $clave => $valor)
  8.                 {
  9.                     print $valor[0]["text"]."<br/>";
  10.                    
  11.                 }

El problema me lo consigo en un array de nivel inferior..

Código PHP:
Ver original
  1. ["C1C_Mobile_c1c_mobile:shape"]=> array(1)
  2.                 {
  3.                     [0]=> array(4)
  4.                     {
  5.                         ["name"]=> string(5) "shape"
  6.                         ["text"]=> NULL
  7.                         ["attributes"]=> array(0) { }
  8.                         ["children"]=> array(1)
  9.                         {
  10.                             ["gml:point"]=> array(1)
  11.                             {
  12.                                 [0]=> array(4)
  13.                                 {
  14.                                     ["name"]=> string(5) "point"
  15.                                     "text"]=> NULL ["attributes"]=> array(0) { }
  16.                                     ["children"]=> array(1)
  17.                                     {
  18.                                         ["gml:pos"]=> array(1)
  19.                                         {
  20.                                             [0]=> array(4)
  21.                                             {
  22.                                                 ["name"]=> string(3) "pos"
  23.                                                 ["text"]=> string(38) "10.495218384609036 -66.899088900162212"
  24.                                                 ["attributes"]=> array(0) { }
  25.                                                 ["children"]=> array(0) { }
  26.                                             }
  27.                                         }
  28.                                     }
  29.                                 }
  30.                             }
  31.                         }
  32.                     }
  33.                 }

Que de verdad no se como entrarle... Saludos!
__________________
Gmail : [email protected]
Twitter: @heiroon

I'm back!