Posted by John Taylor-Johnston on 10/31/05 04:24
<?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);
>>?>
>>eval() expects PHP code, not HTML with embedded PHP code. Try this
>>(untested):
>>
>>eval( " ?> $contents <?php " );
>>
>>
>>
Scary. But it works.
Shouldn't that error because of the unexpected ?> and <?php in a bigger
example?
John
Navigation:
[Reply to this message]
|