How about a substring comparison? Select all from your database and then loop through using an array of the alphabet.
[NOT TESTED] $alpha_array = array("A","B","C", ....); $alpha_count = count($alpha_array); for($i=0; $i<$alpha_count; $i++){ $sql = "SELECT name FROM table WHERE LEFT(name, 1) = '" . $alpha_array[$i] . "' "; $result = mysql_query($sql, $yourconnection); while($row = mysql_fetch_object($result)){ print($result->name . "\n"); } } [/NOT TESTED] HTH! Jay -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php