Reply to Re: using echo but need something to execute php code

Your name:

Reply:


Posted by Jon Slaughter on 04/28/07 22:11

"Janwillem Borleffs" <jw@jwscripts.com> wrote in message
news:4633bec1$0$31213$dbd43001@news.euronet.nl...
> Jon Slaughter wrote:
>> Is there any command that essentially executes the code and then
>> echo's it?
>
> For this specific case you could use eval:
>
> $code = "?><body>blah<?php echo 'Hello'; ?></body>";
> eval($code);
>
> Note that the closing tag at the beginning of the eval string is
> mandatory.
>
>

Ok. Thats not the specific case I need but maybe it will still work? It is
essentially what I have. That is, I have an html file with some php code in
it similar to the example but just more complex. (actually right now its
just plain html but when I want to add some php stuff I'll need to be able
to have it evaluated).

Thanks,
Jon

[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

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