Comments in PHP
As with most programming languages (or maybe all programming languages), PHP supports comments.
PHP follows the traditional C style comments but it also adds a couple of non-C style ones too. There are a total of three different ways a comment can be opened in PHP:
-
#
-
//
-
/* */
PHP
<?php # Put our code here // Put our code here /* * This comment is * multiline */ ?>
The #
and //
comments are interchangeable whereas the /*
and */
combination is the multiline comment.
Did you know my courses are all printer-friendly? This means you can easily export them to PDF or print them for later use.