note 21012 added to function.array-slice

From: Date: Thu, 25 Apr 2002 10:47:55 +0000
Subject: note 21012 added to function.array-slice
Groups: php.notes 
Request: Send a blank email to php-notes+get-29828@lists.php.net to get a copy of this message
array_slice() can be used to "re-index" an array to start from key 0. For example, unpack creates an array with keys starting from 1; var_dump(unpack("C*","AB")); produces array(2) { [1]=> int(65) [2]=> int(66) } and var_dump(array_slice(unpack("C*","AB"),0)); give you array(2) { [0]=> int(65) [1]=> int(66) } -- http://www.php.net/manual/en/function.array-slice.php http://master.php.net/manage/user-notes.php?action=edit+21012 http://master.php.net/manage/user-notes.php?action=delete+21012 http://master.php.net/manage/user-notes.php?action=reject+21012

« previous php.notes (#29828) next »