Selasa, 27 September 2016

PHP: echo with " vs '

A simple thing about php echo that maybe I'm not the only one who hasn't realized the difference between echo using ".." and using '..'.  Again, its a note for me in case I forget about this later.

echo "hali";
echo "halo";

The output of those commands will be:

hali
halo

If your php code like this:

echo 'hali';
echo 'halo';

your output would be:

halihalo

see the difference?

Tidak ada komentar:

Posting Komentar