while (list($key, $val) = each($_POST['delete'])) { $query = "DELETE FROM sb1 WHERE date = '" . $val . "'"; $shout_res = db_res ( $query ); } this is generating: Warning*: Variable passed to each() is not an array or object in *