Do you always want 18 results at a time?
If so, you need to first count the number of database entries.
Then divide this by 18. to get an approx number of users that should be in each group.
Say you get 180 users so 10 in each group.
Select * from users order by last_name DESC Limit 0,10 - this will give you the first 10 users.
Then print out the first two letters of the first and last entries
Then proceed 18 timeswith the limit changing to:
Limit 10,10
Limit 20,10
Limit 30,10
(use a "for loop" if you are comfortable with them)
Sorry I have no code posted as Im a book head, i need my bible in front of me and Im away at the minute.
Ill post some code snippets tomorrow if you need any more help.
Hope that all amde some kind of sense ??
Al