Escaping From HTML IN PHP


Escaping From HTML:

Everything outside of a pair of opening and closing tags  ore Elements is ignored by the PHP parser. It allows PHP files to have mixed content. 
It allows PHP to be embedded in HTML documents.
Following are the some example of PHP

Example 1:
  <p>Ignored by PHP and displayed on browser.</p>
  <?php echo 'Hello display PHP '?>
  <p>Ignored by PHP and displayed on browser.</p>


Example 2:

<?php if ($expression == true): ?>
  This will show if the expression is true.
<?php else: ?>
  Otherwise this will show Hello PHP.
<?php endif; ?>

Example 3:

<?php for ($i 0$i 10; ++$i): ?>
Hello, PHP!
<?php endfor; ?>


agyanadda

Author & Editor

Has laoreet percipitur ad. Vide interesset in mei, no his legimus verterem. Et nostrum imperdiet appellantur usu, mnesarchum referrentur id vim.

0 $type={blogger}:

Post a Comment