Ver Mensaje Individual
  #3 (permalink)  
Antiguo 30/07/2014, 14:02
lumiz
 
Fecha de Ingreso: junio-2008
Mensajes: 98
Antigüedad: 15 años, 11 meses
Puntos: 2
Respuesta: acceder a un array multidimencinal conociendo su ruta

Actualmente tengo eso, puedo acceder pero no tengo como eliminarla, manipularla o hacer referencia....

El caso puntual es:

Código PHP:
Ver original
  1. $Questions = = array(
  2.         array(
  3.                 'datos'=>'datos...',
  4.                 'offspring' => array(
  5.                     array(
  6.                         'datos'=>'datos...'
  7.                     ),
  8.                     array(
  9.                         'datos'=>'datos...'
  10.                     )
  11.                 )
  12.             ),
  13.         array('datos'=>'datos...'),
  14.         array('datos'=>'datos...')
  15.     )
  16.  
  17.     // indico la posicion
  18.     $index = array(0,0);
  19.  
  20.     if(isset( $Questions[ $index[0] ] )) {
  21.         $_this_question = $Questions[ $index[0] ];
  22.  
  23.     }
  24.     for ($i=1; $i < count($index); $i++) {
  25.         if(isset( $_this_question["offspring"] )) {
  26.             $_this_question = array_values($_this_question["offspring"]);
  27.             $_this_question = $_this_question[$index[$i]];
  28.  
  29.             // NECESITO ELIMINAR ESTO ULTIMO
  30.            }
  31.     }

Última edición por lumiz; 30/07/2014 a las 14:08