Basic PHP Syntax


/ Published in: PHP
Save to your folder(s)

PHP scripting block can be placed anywhere in the document. It always starts with


Copy this code and paste it in your HTML
  1. <html>
  2.  
  3. <body>
  4.  
  5. <?php
  6.  
  7. echo " oheon.com";
  8.  
  9. ?>
  10.  
  11. </body>
  12.  
  13. </html>
  14.  
  15. To make a single-line comment, use //. To make a large comment block, use /* and */. See the example below:
  16.  
  17. <html>
  18.  
  19. <body>
  20.  
  21. <?php
  22.  
  23. //This is a comment
  24.  
  25. /*
  26.  
  27. This is
  28.  
  29. a comment
  30.  
  31. block
  32.  
  33. */
  34.  
  35. ?>
  36.  
  37. </body>
  38.  
  39. </html>

URL: http://phpforms.net/tutorial/tutorial.html

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.