title: php mySQL echo database content with php and html code
body: <p>I'm wondering how to achieve this: I have content in a database which I'm retrieving via php. And what I want to work is echo that content but not as plain text but with the php code inside of that string executed and the html code inside being properly displayed. So like I would include a page like</p>
  
  <pre><code>    ///File:test.php
      &lt;?php
           //some php code to execute
      ?&gt;
      &lt;div&gt;
          //some html
      &lt;/div&gt;
  </code></pre>
  
  <p>So what I want to achieve is the same behaviour as I would do something like</p>
  
  <pre><code>    ///php code
      include test.php
  </code></pre>
  
  <p>but instead of including it, I would like to do something like</p>
  
  <pre><code>    ///php code
      echo $content; ////$content="string retrieved from database";
  </code></pre>
  
  <p>I know about <code>eval()</code> but that only works if the string contains php code only.</p>
  
  <p><strong>Edit</strong>
  The code I want to be executed is not modified by the user in any way. Where is the difference between including a page with php code and hmtl code and doing what I asked for anyway? I would really <strong>much</strong> appriciate if somebody would enlighten me.</p>
  
  <p>Thanks in advance.</p>