Spaces in drop-down box
Posted: Mon Apr 20, 2009 8:09 pm
My problem is simple really, but i cant figure it out..

I want the name to appear as Sean Lister, not SeanLister
I am trying to load from two variables, $firstname and $surname but i need a space between them both?
Any suggestions?
Thanks thanks

I want the name to appear as Sean Lister, not SeanLister
Code: Select all
<?
$sql="SELECT id, firstname, surname, room, direction FROM doctors";
$result=mysql_query($sql);
$options="";
while ($row=mysql_fetch_array($result)) {
$docid=$row["id"];
$firstname=$row["firstname"];
$surname=$row["surname"];
$options.="<OPTION VALUE=$docid $surname>".$firstname.$surname;
}
?>Any suggestions?
Thanks thanks