Here is what finally worked:

     <?php                                                        $letter = 
isset($_GET['letter']) ? $_GET['letter'] : "A";                                 
                       //alphabetical pagination links                          
                              echo '<div align="center"><b>';                   
                                     foreach(range('A','Z') as $c){             
                                             ($letter == $c)                    
                                        ? printf('%s&nbsp',$c)                  
                                          : printf('<a 
               }                                                        echo 
                                                //Show all restaurants that 
start with $letter                                                        $sql 
= "SELECT * FROM restaurants WHERE name LIKE '{$letter}%'";                     
                                   $result = mysql_query($sql) or 
while($row = mysql_fetch_assoc($result)){                                       
                   printf('<div align="left" 
width="100"><b>%s</b><br>%s</br>%s</br></div><hr color=#000 
Thanks again everyone!!

On 7/15/09 10:48 AM, "tedd" <> wrote:

At 8:29 AM -0700 7/15/09, Miller, Terion wrote:
>Hi all thanks for all the suggestions, I really had no idea this was
>going to be so difficult..

I think you are making it more difficult than it has to be.

Please review what I said and try it out.




PHP General Mailing List (
To unsubscribe, visit:

PHP General Mailing List (
To unsubscribe, visit:

Reply via email to