Re: remove element from an array
| From: | Faisal Nasim | Date: | Tue, 20 Jun 2000 20:14:16 +0000 |
| Subject: | Re: remove element from an array | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-2346@lists.php.net to get a copy of this message | ||
Hi,
For numerical array, you can use array_splice()
to *remove* the element. unset() would work fine otherwise.
Faisal
Pakistan.
----- Original Message -----
From: "Masood Nasir" <masood@one.net.pk>
To: "Erb, Maria" <merb@keene.edu>
Cc: <php-general@lists.php.net>
Sent: Wednesday, June 21, 2000 5:57 AM
Subject: Re: [PHP-GENERAL] remove element from an array
|
| one solution i can think of is create a new array running through a loop
| and with a simple if condition avoid that one element in that loop.
|
| -- Regards,
| -- Masood Nasir :-) [Systems Engineer] - http://www.masood.net
;)
| -- One Net, Lahore, Pakistan. <http://www.one.net.pk>
|
| On Tue, 20 Jun 2000, Erb, Maria wrote:
|
| > How can you remove an element from an array with PHP3?
| >
| > thanks!
| >
| > Maria
| >
| > Maria B. Erb
| > Web Developer
| > Keene State College
| > 603-358-2340
| >
| > mail address:
| > MS 2707 / CMIT
| > 229 Main Street
| > Keene, NH 03435
| >
| >
| > --
| > PHP General Mailing List (http://www.php.net/)
| > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
| > For additional commands, e-mail: php-general-help@lists.php.net
| > To contact the list administrators, e-mail: php-list-admin@lists.php.net
| >
|
|
| --
| PHP General Mailing List (http://www.php.net/)
| To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
| For additional commands, e-mail: php-general-help@lists.php.net
| To contact the list administrators, e-mail: php-list-admin@lists.php.net
|
|