Kia ora all,
Can't quite figure what is happening in a wee piece of code I'm
writing.. $main is defined in a 'controller', then the template file is
included, which has three lines of code:
<?php include 'header.inc.html.php'; ?>
<div><?php echo $main; ?></div>
<?php include 'footer.inc.html.php'; ?>
Interestingly, $main does not end up in the output, nor does another
variable $title that is needed in the header template. Played around a
little to try suss what is happening and interestingly, if I include
some other text randomly in this template (but has to be more than just
a word or two), $main does get output e.g.
<?php include 'header.inc.html.php'; ?>
blah blah blah blah blah blah blah blah
<div><?php echo $main; ?></div>
<?php include 'footer.inc.html.php'; ?>
Any suggestions as to what might be going on here? Also, ideas as to
useful debugging tools in this type of scenario would be helpful..
Cheers
Matt
--
NZ PHP Users Group: http://groups.google.com/group/nzphpug
To post, send email to [email protected]
To unsubscribe, send email to
[email protected]