Reply to php variable continaing php code

Your name:

Reply:


Posted by jds5 on 09/15/06 03:08

Hi There,
I am absolutly stumped by this, any help appreciated.
Due to factors outside of my control I have a php variable containing
php code and I dont know how to evaluate it.

I know its stupid, but php calls a database function (which I dont have
access to) which reads in a template html file and returns it as a
string. Now If I want the template to be a bit more dynamic and contain
php I have a problem.

After calling the database function I end up with: (examaple only)
$var = "<?echo "hello world";?>";
//$var is now equal to the template file - usually html but attempting
to add php

now if I echo that out I get:
<?echo "hello world";?>
but I want:
hello world

Can I call another instance of the php interpreter on php variable
$var?
Would the eval() function work?

Any way to acheive what I am after?

Thanks

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация