In Perl I use qq~Some text~; a lot and I'm looking for something like this in PHP.
For those who don't know perl, let me explain what it does:
It enables you to write on multiple lines without extra functions (is possible in PHP with just the "Text [new line] more text")
But it also makes it possible to write text whitout have to escape all characters; like ", <, $, etc.
Note : This will make a new line in the source code. If you want a new line on the screen you need to replace the \n by <br>
You don't need to escape $ and < in php. Just " or ' and \ I think
__________________ I don't suffer from insanity, I enjoy every single minute of it!
You an also just exit out of the PHP block and print HTML directly (which is, technically, faster than doing ECHO, from a machine speed/time point of view). Of course, then you are going to have to enclose any of your variables with <?= and ?>.
PHP Code:
<?
//preceding code, if any
if ($c['noticestat']) {
//html block
?>
<html lang="en_US">
<head>
<title><?=$title['curvar'];?></title>
</head>
<body bgcolor="#000000" marginheight="0" marginwidth="0" topmargin="0" leftmargin="0">
<table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%">
<tr>
<td width="100%" height="100%" align="center" valign="middle" class="noticeTxt"><?=$c['noticemess'];?><br/>
<br/>.( <?=$c['sitename'];?> ).</td>
</tr>
</table>
</body>
</html>
<?
}
//back to PHP
//additional code, if any
?>