Meg_Griffin Posted September 18, 2012 Share Posted September 18, 2012 How can I order this array with for? the output should be: 1.Item A2.Item B3.Item C4.Item D5.Item E6.Item F Link to comment Share on other sites More sharing options...
Ingolme Posted September 18, 2012 Share Posted September 18, 2012 PHP has a sort() method with which you don't need to use a loop. You have to determine by which criteria you want to sort the array. If the array's data was obtained from a database, it would be better to sort it using the SQL query. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now