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
https://forums.phpfreaks.com/topic/227552-a-very-simple-dynamic-title-in-header/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.