Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Alphabetize an array

Status
Not open for further replies.

peacecodotnet

Programmer
Joined
May 17, 2004
Messages
123
Location
US
Is there a function that will alphabetize an array? But I don't want it only to print the array, but also to rearrange the order of the array so that all of the values are in alphabetical order.

For example, if I made this array:

$array[0]="z";
$array[1]="a";
$array[2]="b";

I want the function to make it like this:

$array[0]="a";
$array[1]="b";
$array[2]="z";

Thanks in advance for help.

Peace out,
Peace Co.
 
As spookie points out:
The main reference for PHP related questions in terms of available functions is the PHP manual. It is probably of advantage for you to look at the function reference and learn what functions are available. You'll discover things you wouldn't even ask about since you don't know they exist!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top