Wednesday 28 May 2014

What Is Variables In PHP?

Variables define as "Variable($)=Storing a value"
-All variables in PHP are denoted with a leading dollar sign ($)

-A variable is called as just a storage area. If you want to put value so you can store this value in variables,so that you can use and manipulate them in your programmes. Things you'll want to store are numbers and text.

Here are the most important things to know about variables in PHP:-


1) The value of a variable is the value of its most recent assignment.

2) Variables are assigned with the = operator, with the variable on the left-hand side and the expression to be evaluated on the right.

3) Variables can, but do not need, to be declared before assignment.

4) Variables in PHP do not have intrinsic types - a variable does not know in advance whether it will be used to store a number or a string of characters.

5) Variables used before they are assigned have default values.

6) PHP does a good job of automatically converting types from one to another when necessary.

7)  PHP variables are Perl-like.

PHP has a total of eight data types which we use to construct our variables:-
























Posted by Amit Tiwari

No comments:

Post a Comment