Answers for "for loop push into array php"

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 add to array in loop

$newArray = array();
foreach($var in $oldArray){
$newArray[] = $var;
}
Posted by: Guest on September-18-2021

Browse Popular Code Answers by Language