Answers for "php add item to array in foreach loop"

PHP
1

array push foreach php

$items = array();
foreach($group_membership as $username) {
 $items[] = $username;
}

print_r($items);
Posted by: Guest on September-02-2020
0

php assign an array inside a foreach loop

$data = array_fill_keys($input, 50);
Posted by: Guest on July-26-2021

Code answers related to "php add item to array in foreach loop"

Browse Popular Code Answers by Language