Get min and max value in PHP Array
Option 1. First you map the array to get those numbers (and not the full details): $numbers = array_column($array, ‘weight’) Then you get the min and max: $min = min($numbers); $max = max($numbers); Option 2. (Only if you don’t have PHP 5.5 or better) The same as option 1, but to pluck the values, use … Read more