Sunday, 11 January 2015


Storing data in variables

A variable is simple a container that's used to store data both numeric and non-numeric information. and just as with any container, you can move it from place to place to place,add stuff to it or empty it.
In the php language you not need to assign  variable declaration and what type of data is holding.

$num variable holding integer value
$fnum variable holding floating value
$str variable holding string value

String can hold letters,numbers and special characters.
String value must be enclosed either in single quotes or double quotes.


$salary= 39099.45;
$y=null; // you can also encounter the null data type
echo $id;
echo $name;
echo $salary;
echo $y;

No comments:

Post a Comment