In this you will learn about use of PHP semicolon in code and how to define variable in PHP.
PHP Semicolon ;
PHP commands ends with a semicolon. If you don’t use
semicolon in the end of command than it will cause PHP to treat multiple
statements like one statement, finds itself unable to understand it and produce
a “Parse error” message.
The $ symbol in PHP
For defining a variable in PHP you must use $ in front of
variables. Your variable can be number strings or arrays.
Example : Use of semicolon in php code and defining PHP variable
<?php
$counter = 1;
$string=”world”;
$array= array(“One” “Two” “Three”);
?>
0 comments :
Post a Comment