Reputation: 1636
I'm trying to loop a foreach array and add new values to the same array but it's not returning the values;
<?php
foreach($departments as $department){
$department['users'] = 10;
}
?>
but when I return the array, 'users' won't be a part of the list. I tried array_push, with not much luck either.
Upvotes: 2
Views: 71