⊗ppPmBsBC 10 of 447 menu

Comments in the Book

Further in the book, I will sometimes comment on the result of code execution. For example, like this:

<?php echo 'hello'; // will output 'hello' ?>

As you can see, I put the output result in quotes in the comment. However, this string will be displayed on the screen without quotes. I specified them to emphasize that we are outputting exactly a string.

If we output a number, I will not put it in quotes:

<?php echo 12345; // will output 12345 ?>

This distinction is necessary because we can also output a string with digits to the screen:

<?php echo '12345'; // will output '12345' ?>

Technically, it will be sent to the browser the same way. But in PHP, there is a difference between numbers and strings with digits, so I will always emphasize it.

byenru