Hi I´m trying to put an array into option input. But the problem is I get one blank option. I want to remove it.
Here is what I'm trying to do:
<select name "x">
$myarray=array('black','blue','brown');
for ($i=0;$i<=count($myarray);$i++){
if ( $row['colur']==$myarray[$i]) {//if value in database = array$i
echo"<option value='$myarray[$i]' selected>$myarray[$i]</option>";
} else {
echo"<option value='$myarray[$i]'>$myarray[$i]</option>";
}
}