note 101803 modified in function.array-pad by danbrown

From: Date: Wed, 12 Jan 2011 14:03:27 +0000
Subject: note 101803 modified in function.array-pad by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-175667@lists.php.net to get a copy of this message
Just an info about the value of "$pad_size" , If we set the value of "$pad_size" from -3 to 3, It will produce the output like: <?php $result = array_pad($input, -3, "noop"); //result is array(12, 10, 9) $result = array_pad($input, 3, "noop"); //result is array(12, 10, 9) ?> means array will remain the same. --was-- Just an info about the value of "$pad_size" , If we set the value of "$pad_size" from -3 to 3, It will produce the output like: $result = array_pad($input, -3, "noop"); //result is array(12, 10, 9) $result = array_pad($input, 3, "noop"); //result is array(12, 10, 9) means array will remain the same. http://php.net/manual/en/function.array-pad.php

« previous php.notes (#175667) next »