A Variable is a named location in computer’s memory. it is used to store temprary during execution of a script.
The General syntax for declaring variable is given below:
once variable is declared you can refer it anywhere in the script just by using its name along with $ sign.
While declaring Variable you can must follows the following Rules:
1. PHP variables must start with a letter or underscore “_”.
2. PHP variables may only be comprised of alpha-numeric characters and underscores. a-z, A-Z, 0-9, or _ .
3. Variables with more than one word should be separated with underscores. $my_variable
4. Variables with more than one word can also be distinguished with capitalization. $myVariable
There is no need to specify data type for the variable. It will automatically determine its type base on the value that is stored in it. this is because…
View original post 7 more words