title: write rendered output from mustache to new HTML file
body: <p>I'm new to Mustache templating so please be kind.</p>
  
  <p>My approach is to create a new HTML file based on a template HTML. I successfully integrated Mustache on my CodeIgniter application, via:</p>
  
  <pre><code>require 'system/libraries/mustache/src/Mustache/Autoloader.php';
  // Create instance of autoloader
  Mustache_Autoloader::register();
  // Instantiate Mustache class
  $m = new Mustache_Engine;
  echo $m-&gt;render('Hello, {{planet}}!', array('planet' =&gt; 'Mars'));
  </code></pre>
  
  <p>Now I have a template HTML located on <code>application/templates/my_html_template.php</code>, this file contains HTML semantics having some variable template {{words}}. I do understand that I need to render this but I can't seem to understand how things work. Should I use <code>file_get_contents</code> then <code>fwrite</code> the rendered HTML from Mustache to create the desired output of a new HTML file to a certain directory?</p>