PHP's syntax is borrowed primarily from C. Java and Perl have also influenced the syntax.
There are three ways of escaping from HTML and entering "PHP code mode":
Example 5-1. Ways of escaping from HTML 1. <? echo("this is the simplest, an SGML processing instruction\n"); ?>
2. <?php echo("if you want to serve XML documents, do like this\n"); ?>
3. <script language="php">
echo ("some editors (like FrontPage) don't
like processing instructions");
</script>;
4. <% echo("As of PHP 3.0.4 you may optionally use ASP-style tags"); %>
|