note 117709 added to function.array-replace
| From: | projacore at gmail dot com | Date: | Sun, 26 Jul 2015 19:45:31 +0000 |
| Subject: | note 117709 added to function.array-replace | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-203189@lists.php.net to get a copy of this message | ||
You can also use:
<?php
$myarray = [
"Orange",
"572" => "Banana",
"omg" => "Chili",
"nevermind" => "mango"
];
$myarray[0] = "NO-Orange";
$myarray["572"] = "BANANAPHONE!!!";
$myarray["omg"] = "NO-Chili";
print_r($myarray);
?>
RESULT:
Array
(
[0] => NO-Orange
[572] => BANANAPHONE!!!
[omg] => NO-Chili
[nevermind] => mango
)
with regards
----
Server IP: 72.52.91.14
Probable Submitter: 84.187.190.77
----
Manual Page -- http://php.net/manual/en/function.array-replace.php
Edit -- https://master.php.net/note/edit/117709
Del: integrated -- https://master.php.net/note/delete/117709/integrated
Del: useless -- https://master.php.net/note/delete/117709/useless
Del: bad code -- https://master.php.net/note/delete/117709/bad+code
Del: spam -- https://master.php.net/note/delete/117709/spam
Del: non-english -- https://master.php.net/note/delete/117709/non-english
Del: in docs -- https://master.php.net/note/delete/117709/in+docs
Del: other reasons-- https://master.php.net/note/delete/117709
Reject -- https://master.php.net/note/reject/117709
Search -- https://master.php.net/manage/user-notes.php