What is the difference between $message and $$message?

Answer Posted / darshit

$Message = "YOU";
$you= "Me";

echo $message //Output:- you
echo $$message //output :-Me

It means
$message is a variable and
$$Message is variable of variable

A variable of variable allows us to change the name of
variable dinamically

Is This Answer Correct ?    73 Yes 10 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain me soundex() and metaphone()?

547


Do you know how can we check the value of a given variable is a number?

517


What is an operator in php?

572


What is the value for this auto incremented field user_pri_id?

506


Can age be a variable?

518






Do you know what is php?

550


How do you measure variables?

520


How to take a substring from a given string in php?

520


Which is the best web server?

532


Which Scripting Engine PHP uses?

558


What is phpsessid?

519


Tell me how can we determine whether a php variable is an instantiated object of a certain class?

558


What is the function file_get_contents() usefull for?

521


Tell me what are sql injections, how do you prevent them and what are the best practices?

509


Tell me what does the scope of variables means?

531