Omzy
Oct 28th 2008, 8:33 am
I use echo statements to output my HTML code in PHP, however I came across this piece of code:
<?php if ($_POST['Submit'] == "Submit" && !$allvalid) { ?>
<div id="downloadbar" class="bad">
Please check the fields highlighted in red in order to proceed.
</div>
<?php } ?>
Notice the brackets in the PHP tags - I have never seen this before - is this a valid method of outputting HTML?
<?php if ($_POST['Submit'] == "Submit" && !$allvalid) { ?>
<div id="downloadbar" class="bad">
Please check the fields highlighted in red in order to proceed.
</div>
<?php } ?>
Notice the brackets in the PHP tags - I have never seen this before - is this a valid method of outputting HTML?