note 6665 deleted from function.array-splice by irc-html
| From: | irc-html@php.net | Date: | Sat, 19 Jan 2002 21:13:26 +0000 |
| Subject: | note 6665 deleted from function.array-splice by irc-html | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-25478@lists.php.net to get a copy of this message | ||
I've got The Answer: use unset(). i.e.
$example = array (
"a" => "alpha",
"b" => "beta",
"d" => "delta",
"g" => "gamma"
);
print_r($example);
gives:
Array ( [a] => alpha [b] => beta [d] => delta [g] => gamma )
Now use unset()
unset($example['d']);
print_r($example);
gives:
Array ( [a] => alpha [b] => beta [g] => gamma )
I came across this by accident; I can't believe they didn't note this here.