A newbie (but learning quickly) has a question:
Here's some code I'm using to generate HTML select menus from data in a MySQL database:
$result = mysql_query("SELECT * FROM audioltable",$db);
while ($pulldown = mysql_fetch_array($result))
{ printf ("<option value=\"%s\">%s\n", $pulldown['format'],$pulldown['format']); }
I'm trying to figure out how to only display unique items. For example, if the array is filled with:
good
excellent
great
good
good
great
good
poor
I only want the pulldown to display:
good
excellent
great
poor
I know there is an array_unique function that removes duplicate values from an array, but I can't get it to work right. Where would I actually insert this and what would it look like?
Thanks in advance.