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
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
> 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
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
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
5 matches
Mail list logo