Displaying Page Titles in PHP

I recently updated my Xampp/PHP/MySql
My original code read:

[php]<?php
$PageTitle = “Page Name”;
// with Page Name being changed for each page
include (“header2.php”);
?>[/php]

and

[php]<?php @$PageTitle ?>[/php] in the header2.php file.

This used to show “Page Name” correctly in the earlier versions of Xampp/PHP/MySql.

With the update it displayed 192.168.0.3/SITENAME/index.php (for the home page)

A simple fix for this problem is this:

From This [php]<?php @$PageTitle ?>[/php]

Change To [php]<?php echo($PageTitle) ?>[/php]

I hope this is helpful

And that will work either
[php]<?php echo($PageTitle) ?>[/php]
or
[php]<?php echo($PageTitle); ?>[/php]

Sponsor our Newsletter | Privacy Policy | Terms of Service