note 23483 added to function.array-pad

From: Date: Fri, 19 Jul 2002 11:12:05 +0000
Subject: note 23483 added to function.array-pad
Groups: php.notes 
Request: Send a blank email to php-notes+get-33298@lists.php.net to get a copy of this message
array_pad() works ok for the above given example. But, it will do the following: $myArr = array(2 => 'three', 3 => 'four'); $newArr = array_pad($myArr, 4, 'FILLED'); // this will output Array ( [0] => three [1] => four [2] => FILLED [3] => FILLED ) // but one would like this to do: Array ( [0] => FILLED [1] => FILLED [2] => three [3] => four ) May be its a bug? -- http://www.php.net/manual/en/function.array-pad.php http://master.php.net/manage/user-notes.php?action=edit+23483 http://master.php.net/manage/user-notes.php?action=delete+23483 http://master.php.net/manage/user-notes.php?action=reject+23483

« previous php.notes (#33298) next »