I have a foreach loop and need to dynamically create the key value pairs and build the array.
After running the foreach loop, it should produce something like
$sampleArray = array(
'firstfield' => (string)"Person",
'thirdfield' => (integer)'Quantity',
'fourthfield' => (string)'Product'
I need to know how to use foreach loop and build the sample array like above