The main problem I have with learning php is that I know exactly what I want to do but no idea what it's called or how to do it, and so googling for info on it, searching forums like this or looking it up in the docs is impossible (I've been browsing here for over an hour already). So if you know what this process below is called, please let me know so I can go a-searching for it! 😃
I'm working on a php driven site where the pages are very simple entries into tables of the theme:
page_id
page_title
page_content
page_date
i.e. everything on the page is in page_content. Now, the site uses a lot of queries - pretty much every page has a query on it somewhere, if not a couple. However I can't work out how to get php within page_content to be parsed on the page. If I write the following for page_content (i.e. the value of the variable page_content is the following):
html html html bla more html
<?php
echo "Is this workin?";
?>
lots of html more html etc
That line of PHP simply sits there in the source, unparsed and unloved.
Is it even possible to include PHP within a variable that is produced by a PHP driven page? Am I doing this a horribly inefficient way?
Many thanks!