for($i=1;$i<=$num;$i++){ ${"a".$i}=$_POST["a".$i]; ${"b".$i}=$_POST["b".$i]; ${"c".$i}=$_POST["c".$i]; ${"d".$i}=$_POST["d".$i]; ${"e".$i}=$_POST["e".$i]; $sql2="update xiangqing set eDate='".${"b".$i}."',finsh_no='".${"c".$i}."',miaoshu='".${"d".$i}."',zipingfen='".${"e".$i}."' where biaoId=".$biaoId." and typeId=".${"a".$i}.";"; $result2=$conn->sql($sql2); };