I have two arrays .. first array like this :
$questions = [
"type" => "form",
"controls" => []
];
and second array is filled by foreach loop like this :
$count = 0;
foreach($x as $y){
$controls [
"id" => $y.$count,
"id2" => $y.$count+1,
]
$count++;
}
I want to merge all values from the second array to controls
index from first array
any help please