I have a some code that is drawing out regions when a country a selected.

I want the regions to order alphabetically, but its not doing it for some reason.

PHP Code:
$q=mysql_query("select * from tbl_resorts where Id_show=1 ORDER BY Nom_Rsrt") or die (mysql_error());
while(
$r=mysql_fetch_row($q)) 
{
echo 
"<script type='text/javascript'>";
echo 
"region[$r[0]]='$r[1]';";
echo 
"countryregion[$r[0]]='$r[3]';";
echo 
"</script>";
 } 
Not sure what the problem is as its working fine, and doing whats asked of it, but its just not being ordered alphabetically