Possible Duplicate:
How to modify an array's values by a foreach loop?
Why doesn't this work?
$user_list_array = array(
1 => array( "first_name" => "Jim" ),
2 => array( "first_name" => "Bob" )
)
foreach ($user_list_array as $item ) {
echo $item["first_name"];
$item["last_name"] = "test";
}
var_dump($user_list_array );
I can get the "first_name"s back, but can't add the "last_name";