note 99000 added to function.array-splice
| From: | charettedotsatgmail at osu1 dot php dot net | Date: | Wed, 21 Jul 2010 15:26:58 +0000 |
| Subject: | note 99000 added to function.array-splice | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-171018@lists.php.net to get a copy of this message | ||
If you want to append null values wrap them in an array:
<?php
$a = array('Hey', 'hey', 'my', 'my');
array_splice($a, 1, 0, null);
print_r($a);
?>
Array
(
[0] => Hey
[1] => hey
[2] => my
[3] => my
)
<?php
$b = array('Hey', 'hey', 'my', 'my');
array_splice($b, 1, 0, array(null));
print_r($b);
?>
Array
(
[0] => Hey
[1] =>
[2] => hey
[3] => my
[4] => my
)
----
Server IP: 66.207.199.35
Probable Submitter: 69.70.97.154
----
Manual Page -- http://www.php.net/manual/en/function.array-splice.php
Edit -- https://master.php.net/note/edit/99000
Del: integrated -- https://master.php.net/note/delete/99000/integrated
Del: useless -- https://master.php.net/note/delete/99000/useless
Del: bad code -- https://master.php.net/note/delete/99000/bad+code
Del: spam -- https://master.php.net/note/delete/99000/spam
Del: non-english -- https://master.php.net/note/delete/99000/non-english
Del: in docs -- https://master.php.net/note/delete/99000/in+docs
Del: other reasons-- https://master.php.net/note/delete/99000
Reject -- https://master.php.net/note/reject/99000
Search -- https://master.php.net/manage/user-notes.php