note 123643 added to function.array-walk
| From: | taj.yahoo.fr via php-notes | Date: | Wed, 27 Feb 2019 11:42:52 +0000 |
| Subject: | note 123643 added to function.array-walk | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-210290@lists.php.net to get a copy of this message | ||
// We can make that with this simple FOREACH loop :
$fruits = array("d" => "lemon", "a" => "orange",
"b" => "banana", "c" => "apple");
foreach($fruits as $cls => $vls)
{
$fruits[$cls] = "fruit: ".$vls;
}
Results:
Array
(
[d] => fruit: lemon
[a] => fruit: orange
[b] => fruit: banana
[c] => fruit: apple
)
----
Server IP: 208.43.231.9
Probable Submitter: 185.85.3.194 (proxied: 89.159.143.138)
----
Manual Page -- http://php.net/manual/en/function.array-walk.php
Edit -- https://master.php.net/note/edit/123643
Del: integrated -- https://master.php.net/note/delete/123643/integrated
Del: useless -- https://master.php.net/note/delete/123643/useless
Del: bad code -- https://master.php.net/note/delete/123643/bad+code
Del: spam -- https://master.php.net/note/delete/123643/spam
Del: non-english -- https://master.php.net/note/delete/123643/non-english
Del: in docs -- https://master.php.net/note/delete/123643/in+docs
Del: other reasons-- https://master.php.net/note/delete/123643
Reject -- https://master.php.net/note/reject/123643
Search -- https://master.php.net/manage/user-notes.php