Re: storing function names in db and running them as row is output?
| From: | Richard Lynch | Date: | Fri, 22 Sep 2006 23:48:31 +0000 |
| Subject: | Re: storing function names in db and running them as row is output? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-242106@lists.php.net to get a copy of this message | ||
On Wed, September 20, 2006 3:19 pm, blackwater dev wrote:
> First, the example I have is not the real situation, just an example
> so I
> don't want to get into why are you doing it like that, etc. Just want
> to
> see if it's possible.
>
> Basically, I want to store stuff in a text field in a db like this
> "johns
> name is ucfirst('john adams') ".
>
> When I cycle through that row for output in my php script, I want it
> to not
> see ucfirst as text but as the php function and run it....how is the
> possible?
http://php.net/eval
But if eval is the answer, you are probably doing something entirely
the wrong way.
--
Like Music?
http://l-i-e.com/artists.htm