[eluser]Georgi Budinov[/eluser]
As juanvillegas already said having differnt php styles in one file/project - brings mess to the code.
This looks very nice
Code:
<?=isset($alabala)?'<div>'.$alabala.'</div>':''?>
but when you have a more complex statement this is getting ugly. So you have to mix statement syntax.
On the other hand I try not to write html tags in php strings e.g. '<div>'.$alabala ...
So I generally prefer the one that perhaps most of you do not like:
Code:
<?php
if(isset($alabala))
{
?>
<div><?php echo $alabala; ?></div>
<?php } ?>
Note here that I do NOT write
Code:
<?php if(isset($alabala)) { ?>
because it is easy to miss that '{' or erase by mistake.