Re: Executing php code within a string

From: Date: Thu, 08 Nov 2001 20:23:49 +0000
Subject: Re: Executing php code within a string
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-73945@lists.php.net to get a copy of this message
Hallo Chris, Thursday, November 08, 2001, 9:13:20 PM, you wrote: > I've a simple content management system which allows users to use full > html within their submitted items. I then output the data by pulling the > info out of a db and simply echo'ing it to the browser. > Anyway, I'd like to make some php functionality available to them, so I > would like them to be able to enter something like the following: > <h2> The date is <? echo date("m-d-Y")?>.</h2> > This would later be pulled out from the database and sent to the browser as: > <h2> The date is 11-08-2001.</h2> > Right now, of course, I simply echo the <? ... ?> and not the result. > Any ideas on how to process the php component before I echo it? try something with eval(); -- Thargor mailto:Thargor@vergessene-welt.de http://www.vergessene-welt.de

« previous php.general (#73945) next »