Note:- Because of php is server side scripting language you can't view the source code of php by click "View source".
PHP Basic Syntex
All php code writen between <?php code here ?>
PHP code can be placed anywhere in document.
We can also use php syntax <? code here ?>
First PHP Code or Program for Hello World
IN HTML IN PHP <html>
<body>
WELCOME TO PHP
</body>
</html> <html>
<body>
<?php
echo "WELCOME TO PHP";
?>
</body>
</html>In php every sentence end with semicolon ;
In php semicolon separate one code line to another code line.
In php echo statment is used for output.
So above script will give out put "WELCOME TO PHP"
In php print statement also used for output.
Comment In PHP
Multi-line Comment in PHP
Single-line Comment in PHP
IN HTML IN PHP <html>
<body>
<!-- This is Comment in html-->
</body>
</html><html>
<body>
<?php
// This is single line comment in php
/* This is multi-line comment in php */
?>
</body>
</html>