note 101803 modified in function.array-pad by danbrown
| From: | danbrown@php.net | 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