While doing the coding most of the time you will see PHP embedded in HTML documents. The following example will explain you the same :
PHP Code:
<p>You will have to ignore this.</p>
<?php echo 'While this will be parsing.'; ?>
<p>You will have to ignore this as well.</p>
You can also use more advanced structures, like I have done below in the following example :
PHP Code:
<?php
if ($expression) {
?>
<strong>This is correct.</strong>
<?php
} else {
?>
<strong>This is incorrect.</strong>
<?php
}
?>
Bookmarks