I am trying to sort a list by their first character, my problem comes when
that first character is a number.  When the character is a number I should
be able to display just the values which begin with a number.  When the
value is a letter, I have no problem sorting this out.  Here is the code
that I am using to determine that, any help will be greatly appreciated.

<?
[snip]
while(!feof($fp)) {
  $artist = fgetcsv($fp,1024,":");
  if(isset($_GET["sort"])) {
    if(($_GET["sort"] != substr(strtoupper($artist[0]),0,1)) &&
!($_GET["sort"] == "#" && ereg("^[0-9]",$artist[0]))) continue;
  }
}
[snip]
?>

Running PHP 4.2.1 on IIS 5 W2K

Thanks

-josh





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

Reply via email to