Ver Mensaje Individual
  #2 (permalink)  
Antiguo 07/04/2010, 15:27
Hidek1
Colaborador
 
Fecha de Ingreso: octubre-2009
Ubicación: Tokyo - Japan !
Mensajes: 3.867
Antigüedad: 14 años, 6 meses
Puntos: 334
Respuesta: Insertar con un ciclo FOR

Código PHP:
Ver original
  1. $insert ="insert into temporal values(";
  2. for ($c=0; $c < $num1; $c++ ) {
  3. $insert_array[] = "'".$data1["campo$c"]."'";
  4. }
  5. $insert .= implode("," , $insert_array);
  6. $insert .= ");";
__________________
More about me...
~ @rhyudek1
~ Github