PHP Syntax procedure

PHP syntax similar to C, Java, Perl language. we can write PHP script anywhere in the document. which code must be contained with in following tags.

php syntax :

<?php
----------------
----------------
--------------- (coding)
?>

or you would like to use shorthand PHP tag , you must enable short tag option on web server and you can use it.here have example

<?
----------------
----------------
--------------- (coding)
?>

If you would like to need out put on web browser then you must save the file with .php extension. So be confirm to check that you are saving your files correctly.Here is PHP script included into HTML documents.

PHP and HTML code:


<?php
  //This is My First PHP Script
   echo "Wel Come ! !;
?>

OUT PUT :

Wel Come ! !.

PHP statements is ignored whitespace .example you will write 1 line , then 20 lines you will give of blank space before the next line you write PHP code broswer out put will be on that result only.all HTML code run directly broswer ,PHP script run server and return to broswer through HTML. Each code line in which must end with a semicolon. Finally above script prodive out put "Wel Come".





Content