<?php $array = [ "Jacob" => 5, "bob" => 20, "John" => 10, "Jane" => 20, "Jill" => 15, ]; $limit = 3; arsort($array); $result = []; foreach ($array as $k => $v) { if (count($result) === $limit && !isset($result[$v])) { break; } $result[$v][$k] = $v; } var_export(array_values($result));
You have javascript disabled. You will not be able to edit any code.
Value for `_results` contains invalid data `array`