Echo Data From Php Tags Stored In Database

hello guys,

please refer to image1

i am trying to save a php code in the database and able to do so.

please refer to image 2

when i extract the data from the database it does not show the php code.

I have a situation where i will need to save the page html and some of the content is dynamic. like recent and popular blocks which will be load the data from the database. i will need to save both the html and php code but not able to do so. please help.

Try to put this in cgridview columns :: ‘type’ => ‘raw’,


array(

     'name'      => 'person_name',

    'type'      => 'raw',

     'value'     => $person_name

)

Well thanks for the reply but i dont need to show the html in cgridview instead i have the whole page html including some php code.

Can you show some of your code here?

$content_from_database_containing_html_and_PHP_code = ‘<p>Blogs Page</p><?php echo Site::getBlogs(); ?> <p>Blog Page Content End</p>’;

i have been able to do so using PHP function eval(’?>’.$content_from_database_containing_html_and_PHP_code);