Thursday, January 26, 2012

Difference Between $ and $$ in php

Difference Between $ and $$
Difference Between $ and $$
As you all know how can we declare simple kind of variable in php .

$sign + name of your variable =  value that you want to assign to that variable .

For example :
$test = "testing continue";
$create = "world";

But now lets look at the use of $$ sign in php
First lets take an example  :

$create = "world";

$$create = "India";

This variables are same as

$create = "world";

$world = "india";

In short 

echo   $create  $($create);


echo  $create $world;
are same ..


No comments:

Post a Comment