$name = array('yuan','wang','li');$price = array('10','21','5');foreach($name as $key => $_name){ $_price = $price[$key]; $sql = "update tabel set price='".$_price."' where name = '".$_name."'"; //echo $sql, "\n"; //to do ...}
foreach循环下数组不就可以了