I have tried using this approach:
<?php $PageTitle = "asdf"; ?>
<title><?php echo $PageTitle; ?></title>
BUT I need to use the title field properly. I found this, which looks close, but it doesn't work:
<?php
function get_title($get){
$file = fopen ($get, "rb");
$contents = fread ($file, filesize ($get));
preg_match_all("|<title>(.
*)</title>
|U",$conte
nts,$match
es, PREG_PATTERN_ORDER);
return $matches[1][0];
fclose ($file);
}
//if you prefer, change $QUERY_STRING to something else
echo get_title("$QUERY_STRING")
;
?>
Start Free Trial