PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
reecec
Forum Contributor
Posts: 218 Joined: Sun Apr 02, 2006 7:12 am
Post
by reecec » Thu Jun 15, 2006 2:22 pm
Hi
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
feyd
Neighborhood Spidermoddy
Posts: 31559 Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA
Post
by feyd » Thu Jun 15, 2006 2:42 pm
Look at the source it generates. You should notice an error in how it's output. When you find it, look at how you've ordered the commands.