RE: remove keys from array

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx] 
> Sent: Monday, June 12, 2006 12:49 PM
> To: Ahmed Abdel-Aliem
> Cc: php-general@xxxxxxxxxxxxx
> Subject: Re:  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
> 
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux