Questo non è un errore, è il comportamento previsto di mysql_fetch_array() https://us.php.net/manual/en /function.mysql-fetch-array.php
Puoi impostare il result_type flag, oppure puoi semplicemente usare mysql_fetch_assoc() invece. https://us.php.net/manual/en /function.mysql-fetch-assoc.php