foreach ($_POST["select"] as $k => $v){ echo "<input type=\"hidden\" name=\"select[".$k."]\" value=\"".$v."\">"; }