PHP の構文は、基本的に C 言語をベースにしています。 Java と Perl の構文も PHP に取り入れています。
HTML から抜けて「PHP コードモード」に入るには、3種類の方法があります。
Example 5-1. 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> |