I've been going through some of my old scripts removing kludgy code,
anyway I noticed I have this sometimes :
<?php echo $myvar ?>
notice there is no closing semi-colon, but it works ok - why does it work ?
it must be bad practise surely ?
Also I've started changing more complex echo statements to concatenated style:
echo "this is a ".$myvar." balloon";
instead of
echo "this is a $myvar balloon";
whether I'm using single quotes or double
and I only use commas when I'm debugging:
echo "myvar", $myvar;
Is there any preferred method on this ?