PHP Variables

A variable is just like a container which holds the data in it. in php a variable is used to store the value of any data type like int, string, float etc.
in php a variable has a prefix '$'' symbol which is mandatory for declare or define a variable.
for example :-
$variable = value;
*  for declare or defining a string or int,float, variable in php :
*   for string or char in value we should use single('') or double quote("").
   like $msg = "hello world"; *   for numeric value we use value directly.
   like $num = 11;
$msg = "hello world";
$num = 11;
$dec = 99.5;
echo $msg."<br>"
echo $num."<br>"
echo $dec."<br>"
output :
hello world

Rule for php variables

In php variables variable name should start with alphabet(letter) or underscore(_) only.
for example :
$msg;    //valid
$_msg;    //valid
php variable name can't start with digit, number or any special characters. which is invalid in php.
for example :
$1msg;    //invalid
$*msg;    //invalid

variables are case sensitive in php

In php variables are case sensitive thats why $name is differ from $Name, $NAME etc.