Ver Mensaje Individual
  #12 (permalink)  
Antiguo 28/02/2014, 04:08
venezonano_ita
 
Fecha de Ingreso: diciembre-2012
Mensajes: 11
Antigüedad: 11 años, 4 meses
Puntos: 0
Respuesta: Modificar Array PHP

Disculpen no use el highlight

Código PHP:
Ver original
  1. function recorro(&$matriz) //--> he agregado el pasaje por referencia
  2.             {
  3.                 foreach($matriz as $key=>$value)
  4.                 {
  5.                     if (is_array($value))
  6.                     {
  7.                         //si es un array sigo recorriendo
  8.                         recorro($value);
  9.                         $matriz[$key]=$value; //--> he agregado esta linea
  10.                     }else
  11.                     {
  12.                         //si es un elemento lo muestro
  13.                         $tagvalue = extracttag("en", $value);
  14.                         if($tagvalue!="")
  15.                         {
  16.                         $matriz[$key]=$tagvalue;
  17.                         }
  18.                     }
  19.                 }
  20.             }
  21.                
  22.        
  23.        
  24.         recorro($form);