January 5th, 2013, 12:17 AM
Program to sort a list of names
I need write a program to sort the list of names in ascending and descending.
Example: Tom, Anklin, John, Stepan
January 5th, 2013, 12:37 AM
Have you wrote any code or do you need help from scratch?
January 5th, 2013, 12:39 AM
store the names in an array and use sort(). That'll give you ascending order. to get descending you could use array_reverse() or a couple of other functions.
January 5th, 2013, 09:39 PM
If they're first names and last names, you can use usort()
You could also just use...excel.
HEY! YOU! Read the New User Guide and Forum Rules
"They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -Benjamin Franklin
"The greatest tragedy of this changing society is that people who never knew what it was like before will simply assume that this is the way things are supposed to be." -2600 Magazine, Fall 2002
Think we're being rude? Maybe you asked a bad question
or you're a Help Vampire.
Trying to argue intelligently? Please read this.