how to pop an element off ANYWHERE in an array?
Posted: Fri Feb 17, 2006 4:07 pm
http://us3.php.net/manual/en/ref.array.php
I see array_pop() but that only does it for the last element of an array.
I am going through an array like this:
And $this->C_PS is the element of an array I need to pop. This so far removes it from the .txt file but not from the array..... Any ideas how I would remove this element from the array? unset() I'm guessing that wont' work?
I see array_pop() but that only does it for the last element of an array.
I am going through an array like this:
Code: Select all
for($kount=0;$kount<sizeof($ps_list);$kount++)
{
$pxy = explode("|",$ps_list[$kount]);
$pxy = $pxy[0];
if($pxy[$kount] == $this->C_PS)
{
$ps_list[$kount] = "";
}
}