另一个思路你试试:
html:
php:
$a = $_POST['A']; $b = $_POST['B']; $ids = $_POST['ids']; foreach($a as $k => $v) { $sql = "update abc set a='{$v}', b='{$b[$k]}' where id='{$ids[$k]}'"; mysql_query($sql); }