title: What is the best practice of replacing placeholders in an html page without using smarty etc?
body: <p>Below is a basic example of what I have done.</p>
  
  <p>Grab html template</p>
  
  <pre><code>$template = file_get_contents("skins/".CSS_URL."/layouts/homepage.html");
  </code></pre>
  
  <p>Build array of items to search for</p>
  
  <pre><code>$search = array("|{THUMB_FEATURED_IMAGE}|", "|{LARGE_FEATURED_IMAGE}|", "|{PAGE_CONTENT}|");
  </code></pre>
  
  <p>Build array of items to replace the searched with</p>
  
  <pre><code>$replace = array($featured_image, $featured_image_l, $content);
  </code></pre>
  
  <p>Do the actual replace</p>
  
  <pre><code>$output = preg_replace($search, $replace, $template);
  </code></pre>
  
  <p>Then echo the output.</p>
  
  <p>Is this bad practice and/or is there a better way without having to rewrite my entire CMS using Smarty?</p>