[PHP] Newbie: element index array

2002-11-24 Thread Michael Wai
If I declared an element indexed array and put some values into it:

$a['element1'] = array('btime' = '19D', 'etime' = '22D', 'dayname' = 4);
$a['element2'] = array('btime' = '12D', 'etime' = '20D', 'dayname' = 2);
$a['element3'] = array('btime' = '15D', 'etime' = '17D', 'dayname' = 3);

I would like to ask that how can I completely delete the $a['element2'] in
the array? That's mean I will get 'false' in 'isset($a['element2']) after
the delete process is taken place.

Thanks for your help.

Regards,
Michael Wai



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




Re: [PHP] Newbie: element index array

2002-11-24 Thread Chase Urich
unset($a['element2']);

http://www.php.net/manual/en/function.unset.php

 I would like to ask that how can I completely delete the $a['element2'] in
 the array? That's mean I will get 'false' in 'isset($a['element2']) after
 the delete process is taken place.
-- 
Linux: Because rebooting is for adding hardware.
Fingerprint = CE24 057D 1E88 A253 3196 89DB 9FF0 9EF0 2F70 8BE8 BE8



signature.asc
Description: This is a digitally signed message part