Ticker

6/recent/ticker-posts

PHP (Variables)

PHP VARIABLES

Variables are run time entities that are responsible to hold data for temporary purpose and in PHP every variable's name should be declare with $ sign, for example ($n)





VARIABLES NAMING  RULES IN PHP
1. In PHP, every variable should assign a value to declare.

2. Use '=' Operator to assign a values to a PHP variables.

3. Two variables cannot declare with same name.

4. Variable’s name cannot contain the blank spaces.

5. Variable cannot declare with any reserve keyword like (break, while, for, etc.)


PHP VARIABLE EXAMPLE
<?php
$num=123;
$dec=2.34;
$st="Rakesh kumar";

echo $num;
echo "<br>".$dec;
echo "<br>".$st;
?>









Post a Comment

0 Comments