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 .= ...,
this question seem quite old but incase you come pass it, you can use the PHP inbuilt function array_push() to push data in an array using the example below.
$username) { array_push($item, $username); } print_r($items); ?>