Sort array of names

How can I sort an array of names taken from a text file and show only unique names from that array?

use this function to refine sort array by unique values

array_unique($array);
mannual : http://php.net/manual/en/function.array-unique.php