populate drop down list from mysql database and don't repeat values
===

I am populating a drop down menu from mysql database. It works well, But I want it not to repeat values. (i.e if some value is N times in database it comes only once in the drop down list)

Here is my code:

    <?php
    
    mysql_connect('host', 'user', 'pass');
    mysql_select_db ("database");
    
    $sql = "SELECT year FROM data";
    $result = mysql_query($sql);
    
    echo "<select name='year'>";
    while ($row = mysql_fetch_array($result)) {
        echo "<option value='" . $row['year'] . "'>" . $row['year'] . "</option>";
    }
    echo "</select>";
    
    ?>

Quick Quick please......