View Single Post
Old 05-16-2008, 07:48 PM   #2 (permalink)
xenon
The Frequenter
Newcomer 
 
xenon's Avatar
 
Join Date: Dec 2007
Location: Bucharest, Romania
Posts: 438
Thanks: 3
xenon is on a distinguished road
Default

Anything but objects are passed through value instead of reference in PHP. That's why you can't do what you try to. A workaround would be:

PHP Code:
foreach($some_array as $idx => $val)
{
    
$some_array[$idx] = 'new value';

__________________
I have optimistic thoughts, even though sometimes (if not always) life's a bitch.
xenon is offline  
Reply With Quote