title: How to store HTML in php variable
body: <p>what I would like to do is store the HTML of a site in a php variable so it can be echoed at a certain condition. My PHP code:</p>
  
  <pre><code>&lt;?php
  $url = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
  $URL = "http://www.example.com/";
  $URL2 = "http://www.example2.com/";
  $website1 = ?
  $website2 = ?
  if($url == $URL) {
      echo $website1;
  } else if($url == $URL2) {
      echo $website2;
  }
  ?&gt;
  </code></pre>
  
  <p>I want this HTML (below) to be stored in <code>$website1</code><br>
  There will also be HTML stored in <code>$website2</code>  </p>
  
  <pre><code>&lt;html&gt;
      &lt;head&gt;
          &lt;link rel='stylesheet' type='text/css' media='all' href='css/style.css'&gt;
          &lt;link rel='stylesheet' type='text/css' media='all' href='css/jquery-ui-1.10.4.custom.css'&gt;
          &lt;title&gt;Website #One&lt;/title&gt;
          &lt;script type='text/javascript' src='js/jquery-1.9.1.js'&gt;&lt;/script&gt;
          &lt;script type='text/javascript' src='js/jquery-ui-1.10.4.custom.js'&gt;&lt;/script&gt;
          &lt;script type='text/javascript' src='js/script.js'&gt;&lt;/script&gt;
      &lt;/head&gt;
      &lt;body&gt;
      &lt;div id='header'&gt;&lt;/div&gt;
      &lt;div id='menu'&gt;
          &lt;button id='navbtn' class='active btn'&gt;Home&lt;/button&gt;&lt;button id='navbtn2' class='btn'&gt;Pictures&lt;/button&gt;&lt;button id='navbtn3' class='btn'&gt;Videos&lt;/button&gt;&lt;button id='navbtn4' class='btn'&gt;Games&lt;/button&gt;&lt;button id='navbtn4' class='btn'&gt;About&lt;/button&gt;&lt;button id='navbtn5' class='btn'&gt;Contact&lt;/button&gt;
      &lt;/div&gt;
      &lt;div id='content'&gt;&lt;/div&gt;
  
  
  
  
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>How would I be able to achieve this?</p>