Re: ForEach Range Problems

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





--snip---

--
Well I almost have it with this, I keep getting an undefined index $letter error though and then it outputs the $menu how do I fix that

  //Create array with letters AND number sign                          $letters = range('A','Z');                          array_push($letters, '#');                                                    $menu = '';                          foreach($letters as $letter) {                              $menu .= ($letter == $_GET['letter'])                                ? sprintf('%s&nbsp', $letter)                                : sprintf('<a href="browse.php?letter=%s">%s</a>&nbsp;', $letter, $letter);                          }

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux