What's the difference between this:
<?php echo "Hello $name"; ?>
and that:
<?php echo "Hello " . $hello; ?>
Should i use dots? 😕
Up to you. Some people find concatination (dots) easier to read. there are some speed differences also, but hardly worth mentioning.
Ok, thanks. 😉
[EDIT]
Well, another one 😃 :
<?php if($i == 5) { echo "Hello"; } ?>
<?php if($i == 5) { ?> Hello <?php } ?>
What's the difference?
Isn't it obvious? Instead of using PHP inside the IF statement, you're simply sending plain text. The "Hello" bit isn't parsed by PHP, just sent along as if it was in a plain .html file.