// this works, with 1 problem, its 0 based, not 1 based //
$colors=array("green","blue","yellow","orange","red","purple","black","white");
$item_color = "orange";
echo "<select name=colors>";
for($i=0;$i<count($colors);$i++)
{
$sel=(($item_color==$colors[$i])?" selected":"");
echo "<option value=$i $sel>$colors[$i]\n";
}
echo "</select>";