On Fri, 30 Jul 2004 16:16:07 +0000, Ian.H wrote:
In short, your example below _will_ work with in PHP4 (not 5 though AFAIK)
but $strTitle will be empty in the first instance. You should still define
the variable as below, but I suspect this isn't strictly the answer you're
looking for or rather, hoping for.
<?php
$strTitle = '';
?> <html>
<head>
<title><?php echo ($strTitle);?></title>
</head>
<body>
......
<?php
....
$strTitle= getTitle();
...
?>
Oops, should have added:
If I understand you correctly, you want the title to display but you're
actualy getting the title half way through the script. You maybe able to
do this with output buffering (see ob_start() and other relative functions
on php.net for more info) but it's something I don't use very often at
all, so can't really point you in a better direction than the manual
unfortunately.
Hope this sort of helps though.
Regards,
Ian
--
Ian.H
digiServ Network
London, UK
http://digiserv.net/