faqts : Computers : Programming : Languages : PHP : kms : General

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

6 of 7 people (86%) answered Yes
Recently 3 of 4 people (75%) answered Yes

Entry

How can I delete or deallocate an element from an array?

Sep 20th, 1999 23:31
Nathan Wallace, Rasmus Lerdorf, Richard Lynch


Try something like:

    unset($arr[$index]);

here is the doc:

    http://www.php.net/manual/function.unset.php3