I'm trying to set a page title dynamically using PHP, where it pulls the name of the page from a lang file, however I can't get the syntax quite right.
Example:
lang.en.php
<?php $lang['TITLE_INDEX'] = 'My Index Page'; ?>
header.php
<?php include 'lang.en.php' ?><title><?php echo $pagetitle ?></title>
index.php
<?php $pagetitle = $lang['TITLE_INDEX']; include 'header.php' ?>
It pulls the language through a common file which works out which lang to use (en,de etc), however I cann't get the $pagetitle var to output the $lang.