Re: remove from array
| From: | Max A. Derkachev | Date: | Tue, 09 Jan 2001 15:31:05 +0000 |
| Subject: | Re: remove from array | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-33467@lists.php.net to get a copy of this message | ||
Hello AJDIN,
Tuesday, January 09, 2001, 6:02:00 PM, you wrote:
AB> ie. myarray=(1,2,3,4,5);
AB> $num=3;
AB> while (list($key,$value) = each($myarray)) {
AB> if($num==$value) {
AB> // remove 3 from array so $myarray contains 1,2,4,5
+ unset ($myarray[$key];
AB> }
AB> }
--
Best regards,
Max A. Derkachev mailto:kot@books.ru
Symbol-Plus Publishing Ltd.
phone: +7 (812) 324-53-53
http://www.Books.Ru -- All Books of Russia