Sort arrays alphabetically

How can I display a list of first and last names alphabetically? Ivanov, Petrov, Sidorov, for example, etc.?


Answer 1, authority 100%

sort($massive, SORT_STRING);

Or just

sort($massive);

If you need to sort the keys of an array, then:

ksort($massive);