Removing All Instances From An Array
| From: | Andrew | Date: | Wed, 12 Jul 2000 20:37:27 +0000 |
| Subject: | Removing All Instances From An Array | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-6256@lists.php.net to get a copy of this message | ||
Hello,
1. I have an array $array = array (1,2,3,3,3,4,5,6,7,8,9,9);
2. The variable $picked has the value 2.
3. If I print the value of $array[$picked] I see the number three.
4. Well instead of printing the number three I want to remove all instances
of 3 from the array. So, my array should look like $array = array
(1,2,4,5,6,7,8,9,9);
Basically, whatever the value of $array[picked] is, I want to remove all
instances of that value from the array.
Andrew
digi-FX
-------------------------------
http://www.digi-FX.net