In my database, I have a "contract" column. The column has many duplicate contract numbers. The code I have below echos all the rows within the database. I'm trying to ignore/skip/group the duplicatives but the code that I have below didn't do much justice. I did some research online and couldn't make sense on how to get this right. Any suggestions?

```
$list = $DB_CON_C->query("SELECT * FROM account ORDER BY `id` DESC");
$order = array();
$data_row .= '<option value="New Order">New Order</option>'."\n";

if($list !== false) {
  foreach($list as $row) {
    $order[] = array_unique($row['contract']);
    $data_row .=  '<option value="'.$order[].'">'.$order[].'</option>'."\n";
  }
}
echo $data_row;
unset($row);

```