Im trying to see different title for different page
In header.php i check file name to set correct title like this
<?php
$page = basename($_SERVER['PHP_SELF']);
if ($page == 'index.php'): ?>
<title>Home page</title>
<?php elseif($page == 'price.php'): ?>
<title>Price page</title>
<?php elseif($page == 'areas.php'): ?>
<title>Areas page</title>
<?php endif; ?>
Only for <?php elseif($page == 'price.php'): ?> is not working i mean it is not printing the title tag for some reason , file name price.php is correct . If i print echo $page in <?php elseif($page == 'price.php'): ?> it is showing me price.php
What is the problem ?