Hey, I have an array that I'm running through and I'd like to remove an element of it, but not the last or first element. Right now I am using unset($array[$key]), but that only sets the value to NULL, I believe. Is there a pop command that can remove the element at location $n in a 1-dimensional array, and of course push all following elements up one value?
So basically, my array could be this:
$a = array("orange","apple","banana","kiwi");
for ($i=0;$i<sizeof($a);$i++) {
if ($a[$i] == "banana")
array_remove_function($a[$i]);
}
/ and now my array is this:
[] = "orange","apple","kiwi";
/
Thanks!
Mike