title: Store html/php code into php variable
body: <p>What is the best/safest way to store html mark up with php code in it into a php variable? Or is there a better solution rather than storing it into a variable?</p>
  
  <p>EDIT: Sorry for not including what I am trying to do! I have a an article template that pulls all information (title/date/content/etc) from a database and loads it. I have a page where you submit an article and what I am trying to do is automate the file creation process. I want to create a file that is named the title of the article, then write the template code to it (hence the variable containing the template code and using fwrite()). I know I could just keep the template file on the website and copy it over/rename it, but if someone stumbles upon the template it is a complete mess, and I don't want to store it in plain text either.</p>