eventualmente prova anche a fare

var_dump($riga);

dopo l'assegnazione del mysql_fetch_array