searched, didnt find an answer that quite fits my needs
i have a database that has many duplicate values, which is good, i want them there.
i need to select from that database only one instance of each item
i have
$query = mysql_query("SELECT cat_a_val from item_all WHERE display= 'Y' ORDER by cat_a_val") or die(mysql_error());
while ($row = mysql_fetch_array($query)) {
echo '
<option value="'.stripslashes($row['cat_a_val']).'">'.stripslashes($row['cat_a_val']).'</option>';
}
so that will return
say my database has bob bob bob mary jane sue bob mary joe as cat_val_a
i want to return " bob mary jane sue joe " in the dropdowns
i assumed it was array_unique();
but every place i tried it, i either get no result or an endless loop