Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $rs = mysql_query("SELECT * FROM `equipas` ORDER BY team_name");
- $rs1 = mysql_query("SELECT * FROM `equipas` ORDER BY team_name");
- while ($rec = mysql_fetch_assoc($rs1)) {
- if ($initial1 !== strtoupper(substr($rec['team_name'], 0, 1)) ) {
- $initial1 = strtoupper(substr($rec['team_name'], 0, 1));
- echo "<a href=\"#".$initial1."\">" . $initial1 . "</a> ";
- }
- }
- echo "<br><br>";
- while ($rec = mysql_fetch_assoc($rs)) {
- if ($initial !== strtoupper(substr($rec['team_name'], 0, 1)) ) {
- $initial = strtoupper(substr($rec['team_name'], 0, 1));
- echo "<br>" . "<a name=\"".$initial."\">" . $initial . "</a>" . "<br><br>";
- }
- echo "<img src=\"http://fraglider.pt/imagensup/".$rec['team_logo']."\"> " . $rec['team_name'] . "<br>";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement