By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,719 Members | 1,278 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,719 IT Pros & Developers. It's quick & easy.

store code in a variable and execute it

P: n/a
is it possible to store php-code in a variable, and later retrieve and execute it?

like

$var = "print 'sometext';";

....and later retrieve print 'sometext'; and execute it
Jul 17 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
"chotiwallah" <ch*********@web.de> wrote in message
news:78*************************@posting.google.co m...
is it possible to store php-code in a variable, and later retrieve and execute it?
like

$var = "print 'sometext';";

...and later retrieve print 'sometext'; and execute it


http://www.php.net/manual/en/function.eval.php

Jul 17 '05 #2

P: n/a
"CJ Llewellyn" <in*****@example.con> wrote in message news:<cj**********@slavica.ukpost.com>...
"chotiwallah" <ch*********@web.de> wrote in message
news:78*************************@posting.google.co m...
is it possible to store php-code in a variable, and later retrieve and

execute it?

like

$var = "print 'sometext';";

...and later retrieve print 'sometext'; and execute it


http://www.php.net/manual/en/function.eval.php


thank you, that solved it

micha
Jul 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.