note 17682 deleted from function.array-splice by techtonik

From: Date: Fri, 04 Mar 2005 11:26:29 +0000
Subject: note 17682 deleted from function.array-splice by techtonik
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-85912@lists.php.net to get a copy of this message
Note Submitter: stf at c-gix dot com Reason: integrated ---- array_splice always drops keys from the replacement. Example : $tmp = array( "a" => "toto" , "b" => "titi" , "c" => "tutu" ); array_splice($tmp, 1, 1, array("d" => "tata" )); print_r($tmp); will result in : Array ( [a] => toto [0] => tata [c] => tutu ) where one would expect : Array ( [a] => toto [d] => tata [c] => tutu )

« previous php.notes (#85912) next »