List Box has a space between each value please help
Posted: Thu Jun 15, 2006 2:22 pm
Hi
i hope someone knows why
This gives a listbox with my sql values like this eg
with
a
space
in between
i get spaces in between each value and it when you go over it it highlights so it
thanks reece
i hope someone knows why
Code: Select all
$query = "SELECT username FROM registered_members";
$result = mysql_query($query);
print "<SELECT name=item>";
while ($line = mysql_fetch_array($result))
{
foreach ($line as $value)
{
print "<OPTION value='$value'"; } print ">$value</OPTION>"; }
print "</SELECT>";
?>This gives a listbox with my sql values like this eg
with
a
space
in between
i get spaces in between each value and it when you go over it it highlights so it
thanks reece