Output html inside of PHP makes life easier!
As you probably know, you can output PHP inside of html like so.
But what about big scripts where you'll have to continuously open PHP in different areas? This could make a mess, so lets echo out HTML INSIDE of php!
<?php
May not look like a huge difference here, but trust me, in the long run, it will make a big difference!
<html>
<title> Html and php! </title>
<body>
<?php
$Blah = true ? "blah is true" : "blah is false" ;
?>
</body>
<?php
include ("footer.php");
?>
</html>But what about big scripts where you'll have to continuously open PHP in different areas? This could make a mess, so lets echo out HTML INSIDE of php!
<?php
echo' <html>
<title> Html and php! </title>
<body>';
$Blah = true ? "blah is true" : "blah is false" ;
include ("footer.php");
echo'</body></html>';
?>May not look like a huge difference here, but trust me, in the long run, it will make a big difference!
