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