Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Order an array in alphabetical order

Posted on 2006-07-15
5
1,266 Views
Last Modified: 2012-06-22
How can I order an array in so that the values are in alphabetical order?
0
Comment
Question by:mnb93
  • 2
5 Comments
 
LVL 35

Accepted Solution

by:
Raynard7 earned 250 total points
ID: 17113972
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
 
LVL 5

Author Comment

by:mnb93
ID: 17116071
The question has nothing to do with that question as I am using mysql to order in the question.
0
 
LVL 14

Expert Comment

by:ThG
ID: 17116113
ok, let it be then.

anyway please use the manual sometimes.
http://www.php.net/manual/en/
0
 
LVL 5

Author Comment

by:mnb93
ID: 17116135
Yeah, I just forgot about the sort function, and I had to go to dinner so yeah...
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article discusses four methods for overlaying images in a container on a web page
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to dynamically set the form action using jQuery.

837 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question