A PHP sntaxstarts with <?php and ends with ?>
echo (“Hello Techall Type”);
Hello Techall Type
echo() – echo function is used to print the text which is inside the echo function.
Comments are the description of the coding which is given by a good coder against coding. Comments are very useful because it help to understand what execution will be done by a line of code. Comments sometime used to hide the coding which can be used later on.
We can comment PHP code by-
// single-line comment
# single-line comment
PHP is casesensitive-
Php is case sensitive language, it means the variable which you define while declaring you should use that variable in same pattern while calling. Let’s see with an example-
$color = “red”; // Here $color is Variable
echo “My shirt is ” . $color . “<br>”; /* echo use to print the desired text ( . $color .) here . is used to concatenate/join */
echo “My shoes is ” . $COLOR . “<br>”;
echo “My bag is ” . $coLOR . “<br>”;
My shirt is red
My shoes is
My bag is
Only first echo show the desired output, because in other two echo the recalling of the variable is not same.