title: How to write variables in a php file with html in it?
body: <p><strong>Hello everyone.</strong></p>
  
  <p>I've got a small problem. Instead of making a $content variable and putting in the whole content there, I would like to set the page up like this (below), though the problem is that the php variables that is placed at the end (title, keywords, description, page), aren't working even though its in the index.php.</p>
  
  <p><strong>Question:</strong> How can I make the variables work without making a few head_template.php with the variables filled out already?</p>
  
  <p>index.php:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html class="html" lang="en"&gt;
  
  
  &lt;?php require_once "head_template.php"; ?&gt;
  
  &lt;body class="&lt;?php echo $page; ?&gt;"&gt;
  
      &lt;?php require_once "navigation_menu_template.php"; ?&gt;
  
      &lt;?php require_once "load_template.php"; ?&gt;
  
      &lt;h1&gt;Content&lt;/h1&gt;
  
      &lt;?php require_once "cookies_script_template.php"; ?&gt;
  
      &lt;?php require_once "footer_template.php"; ?&gt;
  
  &lt;/body&gt;
  
  &lt;/html&gt;
  
  
  &lt;?php
      $title = "QCG | Homepage";
      $keywords = "QCG, Homepage";
      $description = "QCG | Homepage - Description";
      $page = "homepage";
  ?&gt;
  </code></pre>
  
  <p>head_template.php:</p>
  
  <pre><code>&lt;head&gt;
      &lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt;
      &lt;meta charset="UTF-8"&gt;
      &lt;meta name="description" content="&lt;?php echo $description; ?&gt;"&gt;
      &lt;meta name="keywords" content="&lt;?php echo $keywords; ?&gt;"&gt;
      &lt;title&gt;&lt;?php echo $title; ?&gt;&lt;/title&gt;
      &lt;link rel="stylesheet" type="text/css" href="css/css.css"&gt;
  &lt;/head&gt;
  </code></pre>