Dear all,
I have this script that populates a multi combo box:
$result = mysql_query("SELECT * FROM $table WHERE reference LIKE '1'", $db);
$i=0;
while ($row = mysql_fetch_array($result))
{
echo"group[1][$i]=new Option('$row[model]','linkto.php3?model=$row[model]')\n";
$i++;
}
where in this script, '$row[model]' is what will be shown on the 'select options' and the 'linkto.php3?model=$row[model]' is where it will be linked upon chosen.
The problem is that if I have multiple rows that have the exact same 'model', I don't want the same models to be shown again and again in the 'select options', I just want to show it once.
Is there a way to do this?
Thanks
EG:
Select options
Model
740IL
740IL
740IL
740IL
528 c
528 c
I would like to change to
Model
740IL
528 c