title: Creating a Template based PHP BLOG
body: <p>I just created a BLOG Script. I'm using <code>foreach</code> to loop and display the posts. But now I want to create a template engine like Wordpress. How can I do that? I'm new to PHP. I don't have any idea to do this.</p>
  
  <p>I tried using <code>file_get_content</code>. For example:</p>
  
  <pre><code>file_get_contents("template_dir/template_name/index.php");
  </code></pre>
  
  <p>But there is a problem with CSS and images. That's my first problem. Anyone please help me to create this.</p>