Ver Mensaje Individual
  #13 (permalink)  
Antiguo 04/03/2013, 13:06
tumbero_x
 
Fecha de Ingreso: octubre-2010
Ubicación: Buenos Aires
Mensajes: 557
Antigüedad: 13 años, 6 meses
Puntos: 4
Respuesta: Modificar un array

ahi va ,(lo borre todo y empece de nuevo) voy por aca
por favor guiate por este
Código PHP:
Ver original
  1. $presu_bundle=array('0','1','0','1','0');
  2. $cantidad=array('0','2','0','10','0');
  3.  
  4. $id=array('49','49','49','60','60','60');
  5. $cantibun=array();
  6.  
  7. foreach($presu_bundle as $h=>$bun)
  8.         {
  9.                 if($bun=='1')
  10.                         {
  11.                         $cantibun[]=    $cantidad[$h];
  12.                         }
  13.             }
  14.             print_r($cantibun)
salida
Array ( [0] => 2 [1] => 10 )
me falta meter en algun lado el array id para que $cantibun sea
Array ( [0] => 2 [1] => 2 [2] => 2 [3] => 10 [4] => 10 [5] => 10 )
Muchas gracias Por seguir en mi problema