Apologies for beginner's question: This very simple php code
<HTML><BODY>
<?PHP
if (3>2) echo("ABCD");
?>
</BODY></HTML>
produces
2) echo("ABCD"); ?>
That is, the '>' character in the if statement seems to end the Preview scan and subsequent skipping of php code. Everything following is treated is html text.
Seems like a fundamental question: is there any way to fix this? Or do I not understand?
Many thanks.
Preview with inline php code - Post...
As far as I know, that won't work. You can save the PHP code in a .php file and include it in the html if your hosting server allows server side includes, or insert the .php file using a javascript call. It won't preview but will display on the page served by Apache.
CoffeeCup... Yeah, they are the best!
Thanks Tom,
The include works.
The include works.
Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.