I have an array, $prices, which looks like this:
Array
(
[0] => Array
(
[regprice] => 25.00
[saleprice] => 17.00
)
[1] => Array
(
[regprice] =>
[saleprice] => 19.00
)
)
When using $lowest_index = array_keys($prices, min($prices));, $lowest_index returns 1, because for that index, the value [regprice] is not set.
I would like to get the index of the array where [saleprice] is the lowest. In my case, that would return 0.
saleprice?salepriceis always filled.