Jump to content

Recommended Posts

Hi

 

I'm trying to customise PHP pages by setting variables for the page Title and the Meta Tags for Description and Keywords.

 

I did this by creating three variables - $title, $description and $keywords at the head of individual pages, then inserting the following code into my header.php file which delivers the header and left column (nav) to each page of the site:

 

<title><?php echo $title ?></title>

 

and similar code for the meta tags for description and keywords.

 

No problems with Firefox, but in IE6 I get the $title printed at the top of the page instead of in the blue bar at the top of the browser.  Yet no meta tags are printed on the page - but they appear normally along with the title in the page source.

 

 

Is this a quirk in IE (which I loathe, but I know so many people use) or something I've done incorrectly in my code?

 

In ASP you can write <% =strTitle %>  but is there something similar in PHP that I haven't discovered yet?

 

Any help will be greatly appreciated.

 

Regards (from Australia)

 

happy2learn

 

 

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.