Re: [PHP] removing an array element

2002-01-11 Thread Erik Price
Because, as a dope, I forget that you can invert IF statements like that -- you're right, I'd rather do that than mess with the array. Although the feedback on unset($arrayname['index']) was extremely useful knowledge! Thank you everyone. Erik On Friday, January 11, 2002, at 12:31 PM, Rasm

Re: [PHP] removing an array element

2002-01-11 Thread Henning Sprang
Erik Price wrote: > what function is used to remove an array element from an array? Like > array_pop(), except one by which I can refer to the element by its > associative index rather than just the last element of the array. > > > For more detail with what I'm doing, I have two versions

Re: [PHP] removing an array element

2002-01-11 Thread Rasmus Lerdorf
> what function is used to remove an array element from an array? Like > array_pop(), except one by which I can refer to the element by its > associative index rather than just the last element of the array. unset($array['index']); > echo "\n"; > echo " selected=\"yes\">$div_name\n

[PHP] removing an array element

2002-01-11 Thread Erik Price
A quick question: what function is used to remove an array element from an array? Like array_pop(), except one by which I can refer to the element by its associative index rather than just the last element of the array. For more detail with what I'm doing, I have two versions of a listbox

[PHP] Removing an Array Element

2001-10-24 Thread Jason Caldwell
How can I remove an Array Element from my Array? For example: $myArray = array('100'=>'jibberjabber','200'=>'morejibberjabber','0'=>''); if(isset($myArray[0])) // here is where I want to purge Key[0] from the Array all together ; I check for the presence of Key[0], which may not be