note 42703 added to function.unset

From: Date: Wed, 26 May 2004 18:34:28 +0000
Subject: note 42703 added to function.unset
Groups: php.notes 
Request: Send a blank email to php-notes+get-70133@lists.php.net to get a copy of this message
Note that though global arrays will not be altered by a function, an array in an object WILL be altered if referenced within one of its methods. For example: function remove_index ($i) { unset($this->test_array[$i]); $temp_array = array_values($this->test_array); $this->test_array = $temp_array; } Will remove key $i from the object's array and reindex it. ---- Manual Page -- http://www.php.net/manual/en/function.unset.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+42703 Delete -- http://master.php.net/manage/user-notes.php?action=delete+42703&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+42703&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#70133) next »