PHP Syntax
|
PHP SyntaxPHP Opening and Closing Tags
When we embed PHP in HTML, the most commonly open PHP tags. <?php
Closing PHP Tags. ?>
Note : Whenever a PHP code is required to be written, using Starting PHP and Closing PHP tags will be required. Full Example <?php // Write the PHP code here. ?> Remember : Use semi-colon(;) to finish each PHP line. But not use semicolon in comments. Example <?php
echo "Hello world!"; echo "My First Word"; echo "https://itcollegeall.blogspot.com"; ?> CommentsPHP has three forms of comments
Single-line comments with Number Example <?php
// Single line comment with a double slash (//) # Single line comment with a Number (#) ?> Multi-line comments start with "/*" and end with "*/" Example <?php
/* Multiple comments line no.1 Multiple comments line no.2 Multiple comments line no.3 Multiple comments line no.4 */ ?> |
Share This:
|
Subscribe to:
Posts (Atom)
No comments:
Post a Comment