July 13th, 2000, 07:48 PM
Join Date: Jul 2000
Location: Brisbane, Australia
Time spent in forums: < 1 sec
Reputation Power: 0
my problem is with eval.
I have in a "parse_me.html" file, a mix of HTML & PHP3. The PHP3 code in the "parse_me.html" file is very basic.
Using my 'application', I read through the "parse_me.html" file copying the HTML line for line, and when it hits PHP3 code it is suppossed to process the code, using the eval() statement.
e.g. sample from "parse_me.html"
<? if ($value == $today)
echo "HELLO WORLD; ?>
...so when my application processes this file, the line with the PHP3 code is stored
$complete_code = 'if ($value == $today) echo "HELLO WORLD";';
eval ("$new_str = "$complete_code";");
the data stored in $new_str is:
if (1 == 0) echo "HELLO WORLD";
instead of "HELLO WORLD".
does anybody have any way of resolving this problem.
many thanks in advance,