Answers for "sort not working for me it return true in php"

PHP
1

php sort array by value

$price = array();
foreach ($inventory as $key => $row)
{
    $price[$key] = $row['price'];
}
array_multisort($price, SORT_DESC, $inventory);
Posted by: Guest on June-19-2021

Code answers related to "sort not working for me it return true in php"

Browse Popular Code Answers by Language