note 45261 added to function.array-pop
| From: | cam at wecreate dot com | Date: | Tue, 31 Aug 2004 15:25:40 +0000 |
| Subject: | note 45261 added to function.array-pop | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-75748@lists.php.net to get a copy of this message | ||
Elf:
You need not use array_pop to clear an array. Just use Unset. You can unset individual elements in
an array if you know the key, or you can unset the whole array simply by doing:
unset($array_name); // frees the memory (immediately?)
and/or
$array_name = array(); // makes a new one of the same name, nuking the old one at garbage cleanup.
Don't do more than you have to :)
----
Manual Page -- http://www.php.net/manual/en/function.array-pop.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+45261
Delete -- http://master.php.net/manage/user-notes.php?action=delete+45261&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+45261&report=yes
Search -- http://master.php.net/manage/user-notes.php