$ar1=Array(); $ar2=Array(); $arArtPrices = array_merge($ar1,$ar2); foreach($arArtPrices as $arPrice){ $minprice = array($arPrice['PRICE']) var_dump($minprice) if ($arPrice['PRICE'] == $minprice) { } } 

Need to get the minimum price of the goods ...

 array(1) { [0]=> string(6) "388.64" } array(1) { [0]=> string(6) "390.62" } array(1) { [0]=> string(6) "395.23" } array(1) { [0]=> string(6) "491.11" } array(1) { [0]=> string(6) "500.94" } array(1) { [0]=> string(6) "501.60" } array(1) { [0]=> string(6) "508.42" } array(1) { [0]=> string(6) "610.64" } array(1) { [0]=> string(6) "671.00" } array(1) { [0]=> string(6) "877.06" } 
  • yes the minimum number in the array ... - Denis Linnik
  • Then just after array_merge() you can use min - entithat
  • it does not work out (the price is needed in $ arPrice ['PRICE'] ... ... there is a lot of everything in the $ ar2 array ... - Denis Linnik
  • 2
    min(array_column(array_merge($ar, $ar2), 'price')) , however, it’s not at all clear why there are two arrays and what they contain is teran
  • Are you looking for a friend with a minimum price, or the price itself? If only the price, then why sranivat anything at all. If the first product with the minimum price, then make a break in this ife and complete the cycle - teran

0