Voting

: two minus one?
(Example: nine)

The Note You're Voting On

mostafatalebi at rocketmail dot com
11 years ago
If you find the need to get a sorted array without it preserving the keys, use this code which has worked for me:

<?php

$array
= array("hello", "fine", "good", "fine", "hello", "bye");

$get_sorted_unique_array = array_values(array_unique($array));

?>

The above code returns an array which is both unique and sorted from zero.

<< Back to user notes page

To Top