As php manual on mysql_fetch_array() indicates:
Fetch a result row as an associative array, a numeric array, or both
This means that a call to this function fetches a single row from the resultset. This means that
$valeurs=mysql_fetch_array($query);
code fetches only the 1st row from your resultset. As the examples on the linked manual page indicate, you need to use a loop to get all data retrieved from your resultset. The user contributed notes below the manual section describe how to create an array out of the results, if you do not know how to create one in a loop.
But you should truly move away from the mysql_*() functions and use mysqli or PDO instead.
mysql_*Warning This extension was deprecated in PHP 5.5.0, and it was removed in PHP 7.0.0. Instead, the MySQLi or PDO_MySQL extension should be used.mysql_error()