• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1292
  • Last Modified:

Order an array in alphabetical order

How can I order an array in so that the values are in alphabetical order?
0
mnb93
Asked:
mnb93
  • 2
1 Solution
 
Raynard7Commented:
The sort function will sort an array alphabetically

$fruits = array("lemon", "orange", "banana", "apple");
sort($fruits);

which is from the manual (http://au.php.net/sort)
0
 
mnb93Author Commented:
The question has nothing to do with that question as I am using mysql to order in the question.
0
 
ThGCommented:
ok, let it be then.

anyway please use the manual sometimes.
http://www.php.net/manual/en/
0
 
mnb93Author Commented:
Yeah, I just forgot about the sort function, and I had to go to dinner so yeah...
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now