Basically I have a list in my database, it's a client list. It's growing rapidly and in order to make more sense of it I've created (am creating) a way to click A-Z and get back all clients whose name starts with whatever you click.
ie: click on 'S' and all clients whose name starts with S comes back in the list.
I was going to do it this way, but I think it's not efficient:
Code: Select all
$letter = $_GET['letter'];
loop thru database.
{
if ($string{0} == $letter) //using substring to find first letter
{
show the name
}
}Thanks for your time
Rob