<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