note 30712 deleted from ref.array by sniper
| From: | sniper@php.net | Date: | Sat, 18 Oct 2003 18:01:21 +0000 |
| Subject: | note 30712 deleted from ref.array by sniper | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-58825@lists.php.net to get a copy of this message | ||
Note Submitter: alban.medici@fr.netcentrex.net
----
If you want to simply remove a couple (key - value) from an indexes array , use the unset function
as :
$yourArray = array("Key1" => toto,
"key2" => titi,
"badKey" => value);
// you make your treatment and whant to remove the badKey
// cause not useful anymore ...
unset($yourArray[badKey]);
//then your array look like this :
$yourArray[Key1] = toto
$yourArray[key2] = titi