Jump to content

A Very Simple Dynamic title in header


learner800

Recommended Posts

Hello All,

 

I am new to php and programming in general. My question is as follows.

 

I have created a header.inc.php and the index.php which includes header.inc.php. I have title set in header.inc.php under the "head".

 

<title><?php echo $title; ?> 

 

In the index.php, I have set variable $title to "Home Page"

$title = "Home Page";

 

But whenever I visit index.php, the title is never called. Is it because the header has no clue where the $title is?

 

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.