Need to store values from foreach loop into an array, need help doing that.
The code below does not work, only stores the last value, tried $items .= ...,
$items .= ...,
Declare the $items array outside the loop and use $items[] to add items to the array:
$items
$items[]
$items = array(); foreach($group_membership as $username) { $items[] = $username; } print_r($items);