• Working on PHP Core script through some basic examples
  • PHP Classes with basic tutorials and programming concepts

A Tutorial of PHP Variables

A Tutorial of PHP Variables

A variable is just a storage area. You put things into your storage areas (variables) so that you can use and manipulate them in your programmes. Things you'll want to store are numbers and text.

To define a variable, simply use the following syntax:

$x = 1;
			$y = "foo";
			$z = True;

We have just defined a variable named x with the number 1, a variable named y with the string "foo" and a variable name z with the boolean value True. Once they are defined, we can use them in the code.
PHP has many types of variables, but the most basic variable types are integer (whole numbers), float (real numbers), strings, and booleans.

PHP also has arrays and objects which we will explain in other tutorials.
Variables can also be set to NULL, which means that the variables exist, but do not contain any value.

Software Training & Solution Provider
258,Katewa Nagar,Jaipur,Rajasthan.
It's the near by location of Gurjar ki thadi, MANSAROVAR.
Ph: 9829708506 , 0141-4108506 , 08432830240, 8432706556

09829708506 , 08432830240