Variable Declaration in P H P

in #php7 years ago

Declaring a Variable (1).png

First What is a Variable..
We can assume it like a container for a value.. The value can be an interger or a character or any float (A number which has a decimal place).

In P H P we will Declare any Variable with " Dollar - '$' " symbol...
For Example in the picture it is declared as "$name = Gupta" and "$age = 18" there the PHP assigns that value to that variable by checking whether it is a float or int or char.. the process is done internally..

There in the picture By Echoing(printing) our Final Statement.. We will get the output as
"My name is Gupta and age is 17" . This is how we declare variables in PHP..

Thank You... Next Tip is Math Operations...

Coin Marketplace

STEEM 0.26
TRX 0.20
JST 0.038
BTC 94927.30
ETH 3526.90
USDT 1.00
SBD 3.83