note 112359 added to function.array-slice

From: Date: Thu, 06 Jun 2013 14:44:48 +0000
Subject: note 112359 added to function.array-slice
Groups: php.notes 
Request: Send a blank email to php-notes+get-195086@lists.php.net to get a copy of this message
<?php // CHOP $num ELEMENTS OFF THE FRONT OF AN ARRAY // RETURN THE CHOP, SHORTENING THE SUBJECT ARRAY function array_chop(&$arr, $num) { $ret = array_slice($arr, 0, $num); $arr = array_slice($arr, $num); return $ret; } ---- Server IP: 192.41.42.26 Probable Submitter: 98.169.50.31 ---- Manual Page -- http://php.net/manual/en/function.array-slice.php Edit -- https://master.php.net/note/edit/112359 Del: integrated -- https://master.php.net/note/delete/112359/integrated Del: useless -- https://master.php.net/note/delete/112359/useless Del: bad code -- https://master.php.net/note/delete/112359/bad+code Del: spam -- https://master.php.net/note/delete/112359/spam Del: non-english -- https://master.php.net/note/delete/112359/non-english Del: in docs -- https://master.php.net/note/delete/112359/in+docs Del: other reasons-- https://master.php.net/note/delete/112359 Reject -- https://master.php.net/note/reject/112359 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#195086) next »