Ver Mensaje Individual
  #1 (permalink)  
Antiguo 13/06/2012, 15:26
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
Exclamación Bucle que Recorre Array

Tengo un array similar a este, y necesito extraer los datos que se encuentran en las posiciones ["text"]. Lo que no termino de determinar es la lógica del bucle que tengo que construir para recorrerlo e ir guardando los datos en un string.

A ver si me pueden dar alguna seña... Muchas gracias de antemano...

Código PHP:
Ver original
  1. array(1)
  2.     {  
  3.     [0]=> array(4)
  4.     {
  5.             ["name"]=> string(7) "eventos"
  6.             ["text"]=> NULL
  7.             ["attributes"]=> array(1)
  8.             {
  9.                 ["gml:id"]=> string(6) "F27__4"
  10.             } ["children"]=> array(11)
  11.             {
  12.                 ["C1C_Mobile_c1c_mobile:objectid"]=> array(1)
  13.                 {
  14.                     [0]=> array(4)
  15.                     {
  16.                         ["name"]=> string(8) "objectid"
  17.                         ["text"]=> string(1) "4"
  18.                         ["attributes"]=> array(0) { }
  19.                         ["children"]=> array(0) { }
  20.                     }
  21.                 }
  22.                 ["C1C_Mobile_c1c_mobile:tutulo_del_evento"]=> array(1)
  23.                 {
  24.                     [0]=> array(4)
  25.                     {
  26.                         ["name"]=> string(17) "tutulo_del_evento"
  27.                         ["text"]=> string(32) "CONFORMACIÓN DE CAMPO DEPORTIVO"
  28.                         ["attributes"]=> array(0) { }
  29.                         ["children"]=> array(0) { }
  30.                     }
  31.                 }
  32.                 ["C1C_Mobile_c1c_mobile:direccion"]=> array(1)
  33.                 {
  34.                     [0]=> array(4)
  35.                     {
  36.                         ["name"]=> string(9) "direccion"
  37.                         ["text"]=> string(24) "La Charneca, San Agustin"
  38.                         ["attributes"]=> array(0) { }
  39.                         ["children"]=> array(0) { }
  40.                     }
  41.                 }
  42.                 ["C1C_Mobile_c1c_mobile:descripcion"]=> array(1)
  43.                 {
  44.                     [0]=> array(4)
  45.                     {
  46.                         ["name"]=> string(11) "descripcion"
  47.                         ["text"]=> string(53) "la Alcaldía Metropolitana traslada 2 Tanques de Agua"
  48.                         ["attributes"]=> array(0) { }
  49.                         ["children"]=> array(0) { }
  50.                     }
  51.                 }
  52.                 ["C1C_Mobile_c1c_mobile:fecha"]=> array(1)
  53.                 {
  54.                     [0]=> array(4)
  55.                     {
  56.                         ["name"]=> string(5) "fecha"
  57.                         ["text"]=> string(19) "2011-04-08T21:55:34"
  58.                         ["attributes"]=> array(0) { }
  59.                         ["children"]=> array(0) { }
  60.                     }
  61.                 }
  62. }
  63.  
  64. }

Nota: Son aprox. 1660 registros como este y por tanto, quiero hacer un script lo mas eficiente que se pueda. Recorte el arreglo para mejor visualizacion, pero tiene mas datos.
__________________
Gmail : [email protected]
Twitter: @heiroon

I'm back!