PHP назначить массив внутри петли Foreach
$input = array("teamA","teamB","teamC");
$data = [];
foreach($input as $value){
$assign = "50"; /* The data just temp */
$data[$value] = $assign;
}
echo $data["teamA"];
ammer