How do I print lots of html code within a PHP if statement
I am writing an index.php file and have hit a wall. I would like to print a section of html code, but only if there is content available from the input files. If I put a print() statement before every line of html code it would work, but it would look horrible (with all the escape characters and all. Anyone have any ideas?
Rough example:
<?php
if(something==true)
{
<div>
<div>
...
<img src="file.jpg">
... etc etc ...
</div>
}
else
do nothing
I don't want to replace 100 lines like this:
<img src="file.jpg">
with this:
print("<img src=\"file.jpg\">");
|