Confused over some IF syntax...
Posted: Tue Sep 15, 2009 7:44 am
I have the following in my script:
In the above, I'm confused as to why someone would write an IF block only to make it proceed directly into an ELSEIF. Is this some sort of shortcut that some developers use to act as a "logic catch-all" or was this someone's blunder or laziness?
Code: Select all
[b]<?php if([/b][i]stuff[/i][b]): ?>[/b]
[b]<?php elseif([/b][i]stuff[/i][b]): ?>[/b]
<ul>
[i]stuff[/i]
</ul>
[b]<?php else: ?>[/b]
<ul>
[i]stuff[/i]
</ul>
[b]<?php endif; ?>[/b]