การแทรก Script PHP ใน HTML ทำได้ 4 แบบ1. SGML Style
<? echo ("This is the PHP Command\n"); ?>
2. XML Style
<?php echo("This is the PHP Command\n"); ?>
3. Java Script Style
<script language="php">
echo ("This is the PHP Command"\n);
</script>
4. ASP Style
<% echo ("This is the PHP Command"\n); %>
ที่นิยมก็คือแบบแรก โดยเริ่มต้นด้วย <? และจบด้วย ?> และตรงกลางจะเป็นคำสั่งในภาษา PHP
http://www.thaiwbi.com/course/php/php_in_html.html