It is easy to achieve that effect with array_splice() too, simply by modifying to:
//$array is the array in question
$len = count($array);
for ($i = 0; $i < $len; $i++) {
if ($array[$i] == '*') {
$array = array_splice($array, $i + 1);
break;
}
}
EDIT:
actually, on second thought, this modification will result in an array out of bounds error if the asterisk is the last element of the array.
To avoid this error one would use something like:
//$array is the array in question
$len = count($array);
for ($i = 0; $i < $len; $i++) {
if ($array[$i] == '*') {
$i++;
if ($i < $len)
$array = array_splice($array, $i);
break;
}
}