Reply-To: <[EMAIL PROTECTED]>
> > Date: Wed, 11 Dec 2002 21:37:18 -0500
> > To: "'Richard Baskett'" <[EMAIL PROTECTED]>, "'PHP General'"
> > <[EMAIL PROTECTED]>
> > Subject: RE: [PHP] Delete array element
> >
>
AIL PROTECTED]>, PHP General <[EMAIL PROTECTED]>
> Subject: Re: [PHP] Delete array element
>
> Ok I feel a little sheepish after that answer :) Still not working though
> due to my variable.. help!
>
> unset({$_SESSION[map][mapText][$_POST[Email]]});
>
> Im gett
; Date: Wed, 11 Dec 2002 21:37:18 -0500
> To: "'Richard Baskett'" <[EMAIL PROTECTED]>, "'PHP General'"
> <[EMAIL PROTECTED]>
> Subject: RE: [PHP] Delete array element
>
>> How can I delete a key and it's value from an array?
>>
> How can I delete a key and it's value from an array?
>
> for example:
>
> $test = array(0=>'yes', 2=>'no', 5=>'maybe', 7=>'so');
>
> And I wanted to delete the second key "2" so I could end up with an
array
> like so:
>
> $test = array(0=>'yes', 5=>'maybe', 7=>'so');
unset($test[2]);
---Joh
How can I delete a key and it's value from an array?
for example:
$test = array(0=>'yes', 2=>'no', 5=>'maybe', 7=>'so');
And I wanted to delete the second key "2" so I could end up with an array
like so:
$test = array(0=>'yes', 5=>'maybe', 7=>'so');
How would I go about doing that?
Thanks!
R
5 matches
Mail list logo