Execute PHP code when making a post in a cms
<p>Sorry for the vague title but it's hard to describe what I mean in a few words.</p>

<p>I made my own cms and use it for all my personal projects. On some pages I want to include a php script in the content area. I load the content simply by echoing the variable that holds the content.</p>

<p>The template file looks like this:</p>

<pre><code>&lt;div id="content"&gt;
echo $content;
&lt;/div&gt;
</code></pre>

<p>In my CRUD I make a post containing a php snippet.</p>

<pre><code>&lt;?php echo "My name is ".$var.""; ?&gt;;
</code></pre>

<p>Then I save it and load the page and this is what happens:</p>

<pre><code>&lt;div id="content"&gt;
echo &lt;?php echo "My name is ".$var.""; ?&gt;;
&lt;/div&gt;
</code></pre>

<p>But what I want is that the php code get's executed instead of getting echoed. 
Something like the Wordpress plugin Exec-PHP. Can anybody explain to me how to achieve this?</p>

<p>Thanks in advance!</p>
