<?php $array = [ ['x' => 0.5, 'y' => 23], ['x' => 23, 'y' => 21.75], ['x' => 14.25, 'y' => 21.875], ['x' => 19.375, 'y' => 21.75], ['x' => 9.125, 'y' => 21.875], ['x' => 23, 'y' => 19.625], ['x' => 19.375, 'y' => 19.625], ]; foreach ($array as $row) { if (!isset($result['#' . $row['y']])) { $result['#' . $row['y']] = $row; } } var_export(array_values($result));
You have javascript disabled. You will not be able to edit any code.