RE: [PHP] remove keys from array
| From: | Daevid Vincent | Date: | Mon, 19 Jun 2006 19:57:26 +0000 |
| Subject: | RE: [PHP] remove keys from array | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-238321@lists.php.net to get a copy of this message | ||
http://www.php.net/manual/en/function.unset.php
So if you had:
$foo = Array ( [0] => 2, [ID] => 2, [1] => asdasd, [CategoryName] => asdasd
) );
unset($foo[0]);
unset($foo[1]);
Yields:
$foo = Array ( [ID] => 2, [CategoryName] => asdasd ) );
DÆVID
> -----Original Message-----
> From: Richard Lynch [mailto:ceo@l-i-e.com]
> Sent: Monday, June 12, 2006 12:49 PM
> To: Ahmed Abdel-Aliem
> Cc: php-general@lists.php.net
> Subject: Re: [PHP] remove keys from array
>
> On Sun, June 11, 2006 6:57 am, Ahmed Abdel-Aliem wrote:
> > hi all
> > when i have array in the form of :
> > Array ( [0] => 2 [ID] => 2 [1] => asdasd [CategoryName] =>
> asdasd ) )
> > how can i make it in the form of :
> > Array ( [ID] => 2 [CategoryName] => asdasd ) )
> >
> > can anyone help me with that plz ?
>
>
> I don't even understand the question...
>
> Where did this array come from?
>
>
> --
> Like Music?
> http://l-i-e.com/artists.htm
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>