Reputation: 68440
the array:
('abc', 'def', 'xyz')
foreach($arr as $item) // change $item here
Can I do this without creating a intermediate array?
Upvotes: 3
Views: 892
Reputation: 798576
Use a reference.
foreach($arr as &$item)
Upvotes: 10