note 31455 added to control-structures.foreach
| From: | php at electricsurfer dot com | Date: | Tue, 22 Apr 2003 18:33:59 +0000 |
| Subject: | note 31455 added to control-structures.foreach | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-46945@lists.php.net to get a copy of this message | ||
I use the following to modify the original values of the array:
foreach ($array as $key=>$value_copy)
{
$value =& $array[$key];
...
$value = 'New Value';
}
--
http://www.php.net/manual/en/control-structures.foreach.php
http://master.php.net/manage/user-notes.php?action=edit+31455
http://master.php.net/manage/user-notes.php?action=delete+31455
http://master.php.net/manage/user-notes.php?action=reject+31455