I am sorry if my title is incorrect, was not sure what these array values are called.
I am doing an api call that returns data, i want to use that data. Now in the data it is possible to have up to 20 'offers'. Each has their own price. I would like to return the lowest price
The structure of the results are results -> 0 -> offers -> "number from 0-19" -> price So each offer (with number 0-19) will have a price.
Is there an easy way to grab all of that data at once and just output the lowest price?
$price = $price_array['results'][0]['offers']['*can i cycle this part*']['price'];
foreach?$minPrice = min(array_column($price_array['results'][0]['offers'],'price'));echo $minPrice;