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'
Open in new window
I need to know how to use foreach loop and build the sample array like above
What exactly do you want to run the foreach loop on?