List of variables, split based on pattern
You can extract the value from the array before hand with something like:

$arr = array($one, $two,$three,$four,$five);

&amp;first = $arr[$_POST['x']-1];

unset($arr[$_POST['x']-1]);
$arr = array_values($arr);
add_remove($first, $arr);