variables as statements
Moderator: General Moderators
variables as statements
Hello,
I'm relatively new to php and was wondering...
...Is it possible to write a statement into a variable, then access the variable as though it were the results of executing the statement?
EG
<?php
$thingamebob = "1 + 1";
echo("$thingamebob");
?>
writes
1 + 1
Is there a way to get it to write
2
without going into complex regexps and stuff.
Hope someone can help.
I'm relatively new to php and was wondering...
...Is it possible to write a statement into a variable, then access the variable as though it were the results of executing the statement?
EG
<?php
$thingamebob = "1 + 1";
echo("$thingamebob");
?>
writes
1 + 1
Is there a way to get it to write
2
without going into complex regexps and stuff.
Hope someone can help.
Or, add a bookmark, but the URL as this:
.
-Nay
Code: Select all
javascript: var the_answer = prompt('Which function?', 'Enter here'); document.location = 'http://sg.php.net/' + the_answer;-Nay
or create a quicksearch boookmark in your mozilla browser
php -> http://php.net/%s
and type php eval
php -> http://php.net/%s
and type php eval