Variable in PHP

Posted by Unknown on 2:28 AM


As we earlier saw in echo chapter that we echo " hello everybody" .We will need to use this sentence several times or even thousand times.Can we echo this sentence thousand time?,if do it will be hard working and folish work.To solve this problem we use Variable in php.

Variable syntax 

Example: $variablename="value";
Description
First of all we need to use symbol to identify that this line is variable.We use dollar sign ($)  first.Then we declare our variable name,where we want to save our values.We can keep different  data type as variable value such as string, integer,float,double.

0 comments:

Post a Comment