View Single Post
Old 05-18-2008, 01:42 PM   #6 (permalink)
Salathe
Moderateur
RegEx Guru PHP Guru Top Contributor Advanced Programmer 
 
Salathe's Avatar
 
Join Date: Apr 2007
Posts: 1,393
Thanks: 5
Salathe is on a distinguished road
Default

You can also make sure that the array items are passed by reference (rather than by value as default) when iterating through the foreach blocks.

PHP Code:
foreach ($myarray as &$item)
{
    foreach (
$item as &$value)
    {
        
$value 'new text';
    }

Salathe is offline  
Reply With Quote