[eluser]Derek Jones[/eluser]
Quote:but here we have a dilemma we must solve, about the statement mentioned above e.g. <?=isset($alabala)?’<div>’.$alabala.’</div>’:’‘?>:
To me, it's not a dilemma. I don't use ternary operators in View files, for my previously stated reasons. I also set <em>all</em> view variables, so I'd use:
Code:
<?php if ($alabala): ?>
<div><?=$alabala?></div>
<? endif; ?>
It's a bit more verbose, but to me far more legible, particularly to non-coders.
Quote:It is personal/team point of view.
Quite, and that hits the nail on the head. Almost akin to coding style, the important thing is that you and your team choose one way and stick to it consistently.