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

Answer Posted / mahesh role

$message : It is static variable
$$message : It is an dynamic variable

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

echo $message //Output:- you
echo $$message //output :-
//because the letter in Message and variable is not same

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

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

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why php is used with mysql?

535


What is in a cookie?

553


Which operator is used to combine string values in php?

506


What is difference between Method overriding and overloading in PHP?

547


How to create reusable code in php?

550






How can image properties be retrieved in php?

543


What are advantages of .htaccess?

533


What is the difference between require and include in php?

513


How can you make a connection with mysql server using php?

513


Tell me what is the actually used php version?

567


What is boolean in php?

526


Which function is used in php to check the data type of any variable?

520


How can we upload a file in php?

539


Does php pass arrays by reference?

576


What is Gd PHP?

590