Connect with us

PHP Programming

PHP Basic Syntax

The PHP syntax and semantics are the format and the related meanings of the text and symbols in the PHP programming language. They form a set of rules that define how a PHP program can be written and interpreted.

funkyprogrammer_99902

Published

on

The PHP script is executed on the server and the HTML result is sent to the browser. It can normally have HTML and PHP tags. PHP or Hypertext Preprocessor is a widely used open-source general-purpose scripting language and can be embedded with HTML. PHP files are saved with the “.php” extension. PHP scripts can be written anywhere in the document within PHP tags along with normal HTML. 
<p>This is going to be ignored by PHP and displayed by the browser.</p>
<?php echo 'While this is going to be parsed.'; ?>
<p>This will also be ignored by PHP and displayed by the browser.</p>

The PHP script is executed on the server and the HTML result is sent to the browser. It can normally have HTML and PHP tags. PHP or Hypertext Preprocessor is a widely used open-source general-purpose scripting language and can be embedded with HTML. PHP files are saved with the “.php” extension. PHP scripts can be written anywhere in the document within PHP tags along with normal HTML. 

<?php
# Here echo command is used to print
echo "Hello, world!";
?>

Example #1 Advanced escaping using conditions

  This will show if the expression is true.
<?php else: ?>
  Otherwise this will show.
<?php endif; ?>

If You want to learn PHP course click on enroll now button

Copyright © 2021 By Funky Programmer.