I need to generate embedded php within in a mysql record. $contents is
the actual contents of that record.
<?php
$contents = "<div class=\"indent\" style=\"font-size: 16px; font-family:
arial,helvetica; font-weight: bold;\">About the Project</div>
<?php echo \"hello world\"; ?>";
echo eval($contents);
?>
I get this error:
Parse error: parse error in /var/www/html2/test.php(4) : eval()'d code
on line 1
If I just echo $contents, my browser spits out:
<div class="indent" style="font-size: 16px; font-family:
arial,helvetica; font-weight: bold;">About the Project</div>
<?php echo "hello world"; ?>
What's wrong? eval() is the correct thing to do, I thought?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php