Ok so i have a while loop and I am trying to make an array out of it but my array is not coming out correctly.
My loop looks like this:
while ($rows = mysqli_fetch_assoc($headerresults)){
$arr[$rows['COLUMN_NAME']] = array("Comments" => array($rows['COLUMN_COMMENT']));
}
print_r($arr);
and my array looks like this:
[First_Name] => Array
(
[Comments] => Array
(
[0] => 'Label' => 'First Name', 'Required' => 'Yes'
)
)...
What I want it to look like is this:
[First_Name] => Array
(
[Comments] => Array
(
[Label] => 'First Name'
[Required] => 'Yes'
)
)...
Any advice would be helpful. Thank you. I know I have to add another block of code to my while loop but ive tried everything and can't get it to work. Thanks.