Jump to content

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.

Set your CSS accordingly

 

Here are the default font-sizes for heading tags

http://style.cleverchimp.com/font_size_intervals/altintervals.html

 

For a quick reference.  H3 is equal to font-size: large OR font-size: 24px

if you want to keep your h3 tag for SEO purpose

<style>
h3{display:inline;}
p{
display: inline;
}
</style>

then php


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

[/code]

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.

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.