日期:2014-05-17 浏览次数:20501 次
$xk=Array ("1","2");
$nj=Array ("1","2","3");
$bj=Array ("1","2","3","4","5","6","7");
$arr = array();
for($i=0;$i<count($xk);$i++){
for($j=0;$j<count($nj);$j++){
for($k=0;$k<count($bj);$k++){
$arr[] = array($xk[$i],$nj[$j],$bj[$k]);
}
}
}
foreach($arr as $row){
$sql = "INSERT INTO `examinfo` (`nj`,`bj`,`xk`) VALUES ('".$row[0]."' ,'".$row[1]."','".$row[2]."')";
}