title: html code as a value for textarea
body: <p>I am working on simple code editor and I have this simple HTML page:</p>
  
  <pre><code>&lt;div class="container"&gt;
  &lt;h1&gt;Test&lt;/h1&gt;
  &lt;p&gt;Hello world !&lt;/p&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I need to create simple form that would allow me to edit this page and save changes, this is my code:</p>
  
  <pre><code>&lt;?php
    $text = file_get_contents("test.html");
  ?&gt;
  &lt;form method="POST"&gt;
      &lt;fieldset&gt;
          &lt;textarea name="text"  value="&lt;?php echo $text;  ?&gt;" &gt;
          &lt;/textarea&gt;
          &lt;button type="submit" class="btn"&gt;Send&lt;/button&gt;
      &lt;/fieldset&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>Unfortunately this doesnt work right and it does not parse all html code as text , this is real value of textarea after runing script </p>
  
  <pre><code>&lt;h1&gt;Test&lt;/h1&gt;
      &lt;p&gt;Hello world !&lt;/p&gt;
  &lt;/div&gt;" &gt;
  </code></pre>
  
  <p>It looks like it parsed div with class declaration as valid html code, not as text. </p>
  
  <p>Probably caused by <code>"</code>.</p>
  
  <p>I also try this but result was exactly same:</p>
  
  <pre><code>&lt;textarea name="text"  value="&lt;?php echo "&lt;![CDATA[".$text."]]&gt;";  ?&gt;" &gt;
  </code></pre>
  
  <p>Can anyone help me to get all content of html page as value of textarea ?</p>