>1. Retrieve the names of the groups from the database.
>2. If a group name begins with that letter, write that letter on the page
>3. If not, move on to the next letter.

that sounds like looping and grouping, matt

which is just fine, because i understand you php guys love doing that
(my snide way of saying that coldfusion does it with generic tags  ;o)

> I think I should be retrieving the group names with a "select * from..."

yes, most likely it's that simple, although i strongly recommed listing the
individual column names (that way, you don't transmit columns you won't be
printing anyway)

don't forget the ORDER BY clause

> and then using strchr() or substr() to get the first character
> from the array and then print it.

yes, if "the array" is what you have to do in php

otherwise, just loop over the returned records, and notice when the group
(first letter) changes

>This seems like an awfully long way of doing things!

no, it's pretty simple, compared to, say, listing things by some category,
e.g.

   Vendor 1
     product one
     product two
     product three

   Vendor 2
     product one
     product two
     product three


rudy


____ � The WDVL Discussion List from WDVL.COM � ____
To Join wdvltalk, Send An Email To: mailto:wdvltalk-join@;lists.wdvl.com 
       Send Your Posts To: [EMAIL PROTECTED]
To change subscription settings to the wdvltalk digest version:
    http://wdvl.internet.com/WDVL/Forum/#sub

________________  http://www.wdvl.com  _______________________

You are currently subscribed to wdvltalk as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]

Reply via email to