note 21099 added to function.array-splice

From: Date: Mon, 29 Apr 2002 10:36:59 +0000
Subject: note 21099 added to function.array-splice
Groups: php.notes 
Request: Send a blank email to php-notes+get-29969@lists.php.net to get a copy of this message
The function my_array_splice(), accepts a user defined key of an array. $aArray ={'Name'=>'ABC','Age'=>'22', 'Sex'=>'M'}; my_array_splice($aArray, 'Age', 1); So now $aArray will contain only: ['Name'=>'ABC', 'Sex'=>'M'] my_array_splice() internally makes use of array_search(), which is not supported with PHP <= 4.0.4. A solution to this is to sneak into user contributed notes of function array_search(). An alternative submitted by chen.avinadav@vbulletin.com is the solution for this problem. -- http://www.php.net/manual/en/function.array-splice.php http://master.php.net/manage/user-notes.php?action=edit+21099 http://master.php.net/manage/user-notes.php?action=delete+21099 http://master.php.net/manage/user-notes.php?action=reject+21099

« previous php.notes (#29969) next »