Blog Introductions
In this  blog contains tutorials about  HTML Tutorials, Python Tutorials, CSS Tutorials, How to, PHP Tutorials, Java Tutorials, C++ Tutorials, Tutorials,  Examples, Source code,Learning,
Tips and Software development  services. Php Basic syntex and output  |  Php tutorials  Bestitworriors


Php Basic syntex and output 



Php tutorials



Php Basic syntex and output  |  Php tutorials  Bestitworriors - Php file name.php contain html,css and javascript code.The syntex use to write the php script is <?php //code ?> .Php script use use inside html and outside the html.Php use //comment for single line comment and /* multilines comments */.Php all variables names are case-sensitive and all keywords name are not case-sensitive


Some Key Points

  1. Php file contain simple html,css,javascript code
  2. Php use inside the html and outside the html code
  3. Php variables names are Case Sensitive like $name , $NAME are both different variables
  4. Use echo to print the output
  5. Must remember open and closing tags <?php //code ?>
  6. Php support both single line and multiline comments
  7. echo "<br>" use to break the line in php code

Code


<?php
// Php Outsite HTML
//Php Keywords is not Case Sensitive
echo "Helo Best IT Worrior";//Helo Best IT Worrior

echo "<br>";

ECHO "Helo Best IT Worrior";//Helo Best IT Worrior


//Comments
/*
Multiple lines Comments

*/



//All Variables Names are Case Sensitive
$name="Bestitworrior";
echo $name;//Output is Bestitworrior
echo "<br>";
echo $NAME;//this will give error

?>

<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<h2>Php Inside Html</h2>

<?php
// Php Outsite HTML
//Php Keywords is not Case Sensitive
echo "Helo Best IT Worrior";//Helo Best IT Worrior

echo "<br>";
ECHO "Helo Best IT Worrior";//Helo Best IT Worrior


//Comments
/*
Multiple lines Comments

*/



//All Variables Names are Case Sensitive
$name="Bestitworrior";
echo $name;//Output is Bestitworrior
echo "<br>";
echo $NAME;//this will give error
?>


</body>
</html>





OutPut


Helo Best IT Worrior
Helo Best IT WorriorBestitworrior
Undefined variable: NAME in
Php Inside Html
Helo Best IT Worrior
Helo Best IT WorriorBestitworrior
Notice: Undefined variable: NAME in




I hope You really enjoyed this blog . I try my best to make every thing is easy and helpfull to provide to public .You will get more blog about the Programing project and code . Thanks for visiting my blog if you have any querry related to this you can comment here i will try my best to response you back about Php Basic syntex and output  |  Php tutorials  Bestitworriors