|
[ Autoren gesucht! ]
|
PHP-Homepage.de sucht laufend Autoren für News und Artikel
Interesse?
|
|
 |
|
[Start] [Suche] [Neue Einträge]
| GetCapitalLetter | <?PHP
$db_link = @mysql_connect("", "", "") OR DIE ("ERROR");
mysql_select_db("", $db_link) OR DIE ("ERROR");
$result = mysql_query("SELECT name FROM adressen ORDER BY name", $db_link);
$myrow = mysql_fetch_array($result);
do {
# OLD_VALUE ist die Variable die den 1. Buchstaben repräsentiert
$old_value = substr($myrow["name"], 0, 1);
if ($active_value != $old_value) {
$active_value = $old_value;
$write = true;
}
if ($write==true) {
echo $old_value;
$write = false;
}
echo $myrow["name"];
} while ($myrow=mysql_fetch_array($result));
?> |
|