1
For example:
I have a php file like this:
<?php
if ($var == true)
{
?>
<p>Some text here</p>
<?php
}
else
{
?>
<p>Some different text</p>
<?php
}
?>
Is this bad to do, or is it better to use echo() like this:
<?php
if ($var == true)
{
echo ("<p>Some text here</p>");
}
else
{
echo ("<p>Some different text</p>");
}
?>
I find it much easier to use ?> HTML CODE <?php
But does it have any compatibility, or performance issues?
Thanks, though I was concerned about the
?> HTML CODE <?php
performance, not the echo performance. – Isaac – 2012-02-06T21:06:34.430@Isaac See the first paragraph. It just doesn't matter much. – Daniel Beck – 2012-02-06T21:16:39.560