I have a loop to fill the $positions array like this:
array_push($positions, ["id" => $p->id, "distance"=> $distance, "date" => $p->date]);
Then i found the min key 'distance' like this:
$min = min(array_column($positions,'distance'));
Now i want to get the correspondent 'id' from the 'distance' founded.
How can i do this??
$positions.