Ver Mensaje Individual
  #3 (permalink)  
Antiguo 17/05/2012, 17:17
Avatar de GatorV
GatorV
$this->role('moderador');
 
Fecha de Ingreso: mayo-2006
Ubicación: /home/ams/
Mensajes: 38.567
Antigüedad: 18 años
Puntos: 2135
Respuesta: Recorrer Array Recursivamente y retornar un array

Puedes usar array_walk y una función recursiva, así puedes ir modificando cada entrada:
Código PHP:
Ver original
  1. $test = array(1, 2, 3, 4, 5, 6);
  2. array_walk($test, function(&$item, $key) {
  3.     $item = $item * 2;
  4. });
  5.  
  6. var_dump($test);