note 84175 added to function.array-merge
| From: | david_douard at hotmail dot com | Date: | Wed, 02 Jul 2008 09:41:23 +0000 |
| Subject: | note 84175 added to function.array-merge | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-141057@lists.php.net to get a copy of this message | ||
To avoid REINDEXING issues,
use + operator :
array_merge(
array("truc" => "salut"),
array("machin" => "coucou")
)
returns
array(2)
{
[0] => string() "salut"
[1] => string() "coucou"
}
whereas
array("truc" => "salut") + array("machin" => "coucou")
returns
array(2)
{
["truc"] => string() "salut"
["machin"] => string() "coucou"
}
----
Server IP: 217.174.223.124
Probable Submitter: 195.25.179.254
----
Manual Page -- http://www.php.net/manual/en/function.array-merge.php
Edit -- https://master.php.net/note/edit/84175
Del: integrated -- https://master.php.net/note/delete/84175/integrated
Del: useless -- https://master.php.net/note/delete/84175/useless
Del: bad code -- https://master.php.net/note/delete/84175/bad+code
Del: spam -- https://master.php.net/note/delete/84175/spam
Del: non-english -- https://master.php.net/note/delete/84175/non-english
Del: in docs -- https://master.php.net/note/delete/84175/in+docs
Del: other reasons-- https://master.php.net/note/delete/84175
Reject -- https://master.php.net/note/reject/84175
Search -- https://master.php.net/manage/user-notes.php