Webmaster's Community

Designing and Development => Programming => Topic started by: Rahul Kaushik on April 17, 2012, 02:17:16 PM

Title: What is the diffrence between $var and $$var
Post by: Rahul Kaushik on April 17, 2012, 02:17:16 PM
Hi,
     Some one make me clear that what is  difference between $var and $$var.


     Thanks in advance
Title: Re: What is the diffrence between $var and $$var
Post by: phpdeveloper on May 02, 2012, 12:44:42 PM
Hello Rahul,

    I think you will understand with this example so look at the code
            $var = 'hello';
             $$var = 'word';
            echo $hello;
     For example, the code creates a variable called $hello and outputs the string 'world'.  The double dollar sign     declares that the value of $var should be used as the name of newly defined variable.

Hope this will help you....!!!!!
Title: Re: What is the diffrence between $var and $$var
Post by: Rahul Kaushik on May 04, 2012, 11:16:06 AM
HI,phpdeveloper.
                                   Thank you for Replay........ :-*