for($i=0; $i < $numero; $i++) { $t=$total[$i]; $consulta = "update FORM set ......,TOTAL='".$t."' where.......;"; }