First I check if the current value is part of the array of already displayed values. If it's not, I display it. I still get duplicate values and I don't know why.. Here's my code:
while ($row = mysql_fetch_array($result))
{
$displayed = array();
if (!(in_array($row['Brand'],$displayed)))
{
array_push($displayed,$row['Brand']);
echo '<li>';
echo $row['Brand'];
echo '</li>';
}
}