Training, Open Source computer languages

PerlPythonMySQLTclRubyC & C++LuaJavaTomcatPHPhttpdLinux

Search our site for:
Home Accessibility Courses Diary The Mouth Forum Resources Site Map About Us Contact
Sorting people by name in PHP

Our petition for a reasonable train service is going great guns - over 1000 signed up in just over a week, amongst them significant players such as MPs, MEPs .... but, my goodness, the list as presented by the web site is hard to look through. So I've grabbed a copy of the list and sorted it - see here.

Sorting by name is not straightforward!

If you just do an alphabetic sort, you get everyone with the same forename first - I've got a customer who does that with their internal phone directory and, goodness, it's awkward to us. So you need a sort routine thats sorts based on the LAST space separated word.

Except that there's a group of people who add things like "MP", "MEP" and "MBE" after their names and that becomes the final field. Actually, I want to highlight those people into a separate list.

and then some MPs and MEP sign up and DON'T add in their 'letters' ....

If you want to have a look at my solution to the awkward sort, I've added in the source code to my training examples and it's here. It works well, but in some cases there's no east way that adding in specific tables of exceptions ....
(written 2007-01-26 07:25:14)

 
Associated topics are indexed under
H999 - Additional PHP Material
H110 - PHP - HTML Web Page Data Handling

Back to
Learning to write secure, maintainable PHP
Previous and next
or
Horse's mouth home
Forward to
UK legal requirements for your commercial web site
Some other Articles
Selling by phone and Skype - our policy
Another frantic posting!
Above the fold
UK legal requirements for your commercial web site
Sorting people by name in PHP
Learning to write secure, maintainable PHP
Too busy to blog it - but it's great (mostly)
The HTML++ Metalanguage
Java 6, Apache Tomcat 6.
Getting rid of people - hotel techniques
1817 posts, page by page
Link to page ... 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37 at 50 posts per page


This is a page archived from The Horse's Mouth at http://www.wellho.net/horse/ - the diary and writings of Graham Ellis. Every attempt was made to provide current information at the time the page was written, but things do move forward in our business - new software releases, price changes, new techniques. Please check back via our main site for current courses, prices, versions, etc - any mention of a price in "The Horse's Mouth" cannot be taken as an offer to supply at that price.

Link to Ezine home page (for reading).
Link to Blogging home page (to add comments).

© WELL HOUSE CONSULTANTS LTD., 2008: Well House Manor • 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 0800 043 8225 or 01225 708225 • FAX: 0845 8382 405 or 01225 707126 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho