Variable
in PHP
In
programming variable is a storage location where data will be stored. In php we
declared variable using $(Dollar) symbol.
For Example:-
Declaration of variable:-
$var_data
Note:-var_data
is a variable name. it can be anything.
Assign value to the variable:-
$var_data=”isha
Malhotra”;
You
can also declare and assign value in single line.
Basic
program to work with variable and learn more about echo
<?php
$data;
$data="isha
Malhotra";
echo
"$data";
?>
When
I execute this program it will show the following output:-
Figure
1
