OH! THIS IS FUNNY!
LOOK at that code:
Code:
echo $country_options .= "<option value='" . $get_row['country'] . "'>" . $get_row['country'] . "</option>";}
Each time you add a new option to the $xxx_options, you echo it.
But what you are echoing is the FULL SET OF OPTIONS in $xxx_options!
Because the .= operator returns the CONCATENATED result, not just the part *AFTER* the operator.
You need to write something like this, instead:
Code:
$val = $get_row["country"]; // not needed, but enhances performance
if ( strpos($country_options, $val) === false )
{
$opt = '<option value='"' . $val . '">' . $val . "</option\n";
$country_options .= $opt;
echo $opt;
}
HTML tags *should* use "..." for properties, not '...', which is why I changed your quoting. And the generated HTML will be easier to read and debug if you put line breaks in, as shown.