note 108118 added to function.array-push
| From: | RodrigodeAquino | Date: | Fri, 30 Mar 2012 03:24:13 +0000 |
| Subject: | note 108118 added to function.array-push | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-186909@lists.php.net to get a copy of this message | ||
If you're going to use array_push() to insert a "$key" => "$value" pair
into an array, it can be done using the following:
$data[$key] = $value;
It is not necessary to use array_push.
----
Server IP: 69.147.83.197
Probable Submitter: 201.80.209.249
----
Manual Page -- http://www.php.net/manual/en/function.array-push.php
Edit -- https://master.php.net/note/edit/108118
Del: integrated -- https://master.php.net/note/delete/108118/integrated
Del: useless -- https://master.php.net/note/delete/108118/useless
Del: bad code -- https://master.php.net/note/delete/108118/bad+code
Del: spam -- https://master.php.net/note/delete/108118/spam
Del: non-english -- https://master.php.net/note/delete/108118/non-english
Del: in docs -- https://master.php.net/note/delete/108118/in+docs
Del: other reasons-- https://master.php.net/note/delete/108118
Reject -- https://master.php.net/note/reject/108118
Search -- https://master.php.net/manage/user-notes.php