note 90285 rejected from function.array-slice by danbrown

From: Date: Tue, 14 Apr 2009 19:51:07 +0000
Subject: note 90285 rejected from function.array-slice by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-153217@lists.php.net to get a copy of this message
Note Submitter: fixwah at gmail dot com ---- In the SPANISH versión of this manual, the example has a wrong variable name on the $salida var. It should be: <?php $entrada = array("a", "b", "c", "d", "e"); $salida = array_slice($entrada, 2); // regresa "c", "d", and "e" $salida = array_slice($entrada, -2, 1); // regresa "d" $salida = array_slice($entrada, 0, 3); // regresa "a", "b", and "c" // note la diferencias en las índices print_r(array_slice($entrada, 2, -1)); print_r(array_slice($entrada, 2, -1, true)); ?>

« previous php.notes (#153217) next »