- PHP variable must begin with a “$” sign.
- Case-sensitive ($Boo!=$b00 !=$BOo)
- Global and locally-scoped variable
Local variable restricted to a function or class
- certain variable names reserved by PHP
Server variable ($_SERVER)
Etc.
Example:-
<?php
$value=25;
$name=”Castor Classes”;
$value=($value*8);
echo “$name”;
echo $name,$value;
?>
OutPut:-
Castor ClassesCastor Classes200
Here, $value is use for integer variable and $name is string variable.
0 Comments:
Post a Comment