Something in that line causes the code not to work, although I couldn’t get any errors to display. If I change it to something like this it works fine:
<title>
', $pageTitle ,'
</title>
I’ve played around with it ad infinitum and just can’t see what the problem is, but I’m not proficient in PHP. Thanks for any help!
Yes, sorry for being vague. I was just hoping there was something obviously faulty in that line, like a typo.
If I run the code as given on that post (with the “your document” being an index.php file, for example, that calls the theme.php file), then index.php pulls in the doctype, meta links etc, but the <title> element is empty and the <body> element is also empty. So something stops working once the script hits the <title> part.
I’ve googled var_dump(), but from what I’ve read about it, I’m not sure where to place it within those files to do anything useful. Sorry for being such a noob at this.
Thanks droopsnoot. That does seem to be the issue with the line, as using just empty() makes it work. I didn’t think to check that. Nice work!
I actually find it pretty easy to understand. What I like about it is that you can have just one template for a whole site, rather than having lots of templates full of includes (the way I used to do static sites). I’ve been enjoying playing around with that code to see what I could do with it, but got stuck o that one line. It’s easy to find empty() in the PHP manual, but not isempty(), so I don’t know if it’s a mistake or has a different meaning, as I see lots of references to it on the web.