How can I delete the 3 in "1,2,3,4"?
Dirty hack: Slice the sliced arrays and join them again.
$s = "1,2,3,4";
$array = explode(',', $s);
$a = array_splice($array, 0, -2);
$b = array_splice($array, 1, 1);
$s = implode(',', $a).','.implode($b);
echo $s; // 1,2,4