"; $n_value = explode(",",$value); $Times = explode(",",$Time); $select = explode(",",$SelectedSource); $measure = explode(",",$SelectedMeasure); $limtex = count(explode(",",$SelectedMeasure)); echo "
"; for($i=0;$i<=$limtex-1;$i++) { $n1 = $n_value[$i]; $selectf = $select[$i]; $measuref = $measure[$i]; $dateTime=new DateTime($date." ".$Times[$i]); $parsed_date = $dateTime->format('Y-m-d H:i:s'); mysql_query("INSERT INTO schedule VALUES('null','".$parsed_date."','".$UpdateDate."','".$measuref."','','".$n1."','".$selectf."','".$measuref."')"); } ?>