I've this code:
<? if(is_home() || is_archive()): ?>
<ul>
<li><a href="<?= site_url('/category/one') ?>">One</a></li>
<li><a href="<?= site_url('/category/two') ?>">Two</a></li>
<li><a href="<?= site_url('/category/three') ?>">Three</a></li>
</ul>
<? endif ?>
Which produces this output:
<ul>
<li><a href="http://domain/...">One</a></li>
<li><a href="http://domain/...">Two</a></li>
<li><a href="http://domain/...">Three</a></li>
</ul>
Notice that <ul> is indented. If I use the following it outputs as expected:
<? if(is_home() || is_archive()): ?><ul>
...
I know this is trivial but I'd like to know if there's a way to do this so it still looks nice in both PHP and HMTL; I like clean output.
?>. Why there are spaces before, no idea.