I have 2 arrays that i would like to loop through and combine into an associative array. I would like to use the 2 arrays as the keys for the new associative array. I am new to php so any and all help would be appreciated.
$id = array( 2, 4);
$qty = array( 5, 7);
array('id' => , 'qty' => );
Thanks in advance
I would like to output something like this
array(
'id' => 2,
'qty' => 5),
array(
'id'=> 4,
'qty' => 7
)