array push foreach php
$items = array();
foreach($group_membership as $username) {
$items[] = $username;
}
print_r($items);
array push foreach php
$items = array();
foreach($group_membership as $username) {
$items[] = $username;
}
print_r($items);
php assign an array inside a foreach loop
$input = array("teamA","teamB","teamC");
$data = [];
foreach($input as $value){
$assign = "50"; /* The data just temp */
$data[$value] = $assign;
}
echo $data["teamA"];
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us