This question already has an answer here:
I am facing an issue getting my desired value from an array, in PHP
Look at my array
array(
"0"=>array("id"=>"255","price"=>"2","discount"=>"1"),
"1"=>array("id"=>"256","price"=>"2","discount"=>"3"),
"2"=>array("id"=>"257","price"=>"2","discount"=>"4"),
"3"=>array("id"=>"255","price"=>"3","discount"=>"5")
);
I need Min Price and Max Discount, this time, I need array ID 2, that is
"2"=>array("id"=>"257","price"=>"2","discount"=>"4"),
Because in this array price is lower 2, and discount is 4, on next record you can see discount is much higher that is 5, but price is 3 which is higher then 2, so Desired result is sub array id 2
Kindly let me know How can i do this ?
</div>