Posted by Peter Wilson on 06/20/05 00:33
>> very nice but how do you get it to parse the code? there for executing
>> say the echo?
>
><?php
>$var = "world";
>$string = "<html><etc> hello <?php echo $var; ?> --more stuff";
>eval('?>' . $string . '<?php ');
> ?>
>
>interestingly, if you swap lines 2 and 3, it wont work. That is, $var
>will be an empty string.
when I tried this pulling data from a table like this
<?php eval('?>' . $row_menutext['text'] . '<?php '); ?>
all I got was the <?php echo 'hello';?> put on the page not hello
echoed?
Peter
Motto "A smile aday keeps the blues away"
http://www.sci-comm.clara.net/
[Back to original message]
|