I am trying to loop though an existing multidimensional array grabbing certain values based on a key.
myarray = [];
for($i = 0; $i < count(exampleArray); $i++){
$myarray = $exampleArray[$i]['wanted_field'];
}
This is only giving me one value.
The desired output will have a structure similar to this
myarray = ([0]=> 'apple' [1]=> 'orange'
[0]=> 'plum' [1]=> 'grape' [3]=> 'potato'
)