note 65504 rejected from function.array-splice by bjori

From: Date: Tue, 02 May 2006 10:10:14 +0000
Subject: note 65504 rejected from function.array-splice by bjori
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-110351@lists.php.net to get a copy of this message
Note Submitter: sven at meganet dot hr ---- the bellow example doesn't work for me when the array key is not an integer... <?php $input = array("red", "green", "blue", "yellow"); array_splice($input, 2); // $input is now array("red", "green") ?> so for keys which are not integers use... <?php $input = array("red" => "green", "blue" => "yellow"); array_splice($input, 0, 1); // $input is now array("red" => "green") ?>

« previous php.notes (#110351) next »