note 105973 deleted from function.array-splice by danbrown

From: Date: Fri, 30 Sep 2011 21:39:22 +0000
Subject: note 105973 deleted from function.array-splice by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-183567@lists.php.net to get a copy of this message
Note Submitter: pritiatwork at gmail dot com ---- Interestingly -0 offset also works ! <?php $input = array("red", "green", "blue", "yellow","marron","cyban"); $a=array_splice($input, -0,3); print_r($a); //$a prints to Array([0] => red,[1] => green,[2] => blue) ?>

« previous php.notes (#183567) next »