I have this script that calls for all the games in my arcade and lists them in a drop down menu by there id and I would appreciate any help I could get in making it alphabetical instead.
Here is the code I have:
echo "<form name=\"arcademenu\">\n"
. "<select name=\"arcade_menu\" onChange=\"self.location.href=document.arcademenu.arcade_menu.options[document.arcademenu.arcade_menu.selectedIndex].value\">\n"
. "<option value=\"#\">"._CZ_ARCADEGAMES.":</option>";
$sql = "SELECT game_id, game_name from ".$prefix."_bbgames ORDER BY game_id ASC";
$result = $db->sql_query($sql);
while( $row = $db->sql_fetchrow($result))
{
$game_id = intval($row[game_id]);
$game_name = $row[game_name];
echo "<option value=\"modules.php?name=Forums&file=games&gid=$game_id\">$game_name</option>\n";
}
Thanks