Jump to content

How to get this echo line to display as one line?


okrobie

Recommended Posts

How to get this echo line to display as one line?

No matter what I have done it displays as two lines.  I even tried <nobr></nobr>

 

Teachers Name:

John Jones

 

$userid = mysql_real_escape_string($_GET['user_id']);
$sql = "select * from users where `id`='$userid' ";

$rs = mysql_query($sql);
while($row = mysql_fetch_array($rs))
{ 
echo  "<h3>Teachers Name: </h3>" . $row["first_name"] . " " . $row["last_name"]  ;  }

 

Thanks for your help.

Link to comment
Share on other sites

I got it. I changed the ending single quote to a double quote and moved the ending </h3>

{
echo  "<h3>Teachers Name: <p>" . $row["first_name"] . " " . $row["last_name"]."</p></h3>"  ;  
}

 

Thanks for all the help.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.