Esto no es un error, es el comportamiento previsto de mysql_fetch_array() https://us.php.net/manual/en /function.mysql-fetch-array.php
Puede establecer el result_type bandera, o simplemente puede usar mysql_fetch_assoc() en cambio. https://us.php.net/manual/en /function.mysql-fetch-assoc.php