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

Answers were Sorted based on User's Feedback



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

Answer / umesh ms analytica-india

$message = "ume";

$ume = "All Interview dot com";


echo $message; // Output: ume

echo $$message; // Output: All Interview dot com

Is This Answer Correct ?    98 Yes 9 No

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

Answer / 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

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

Answer / seema

$message is a simple variable and $$message is variable of a
variable(also known as dynamic variable).

For Example:

$message = "welcome";
$welcome = "to php programming tricks!!!";


echo $message; // Output: welcome

echo "<br>",$$message; // Output: to php programming tricks!!!

You will notice with the second echo it will check the
variable $message for it's value and it's value is the
string "welcome". So then it searches for $welcome and finds
the final value which it yields.

Is This Answer Correct ?    12 Yes 1 No

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

Answer / king

People are here to find solution to their problems not to
see babies fight with one another

Is This Answer Correct ?    11 Yes 3 No

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

Answer / deepak tiwari

$message is variable and $$message is the variable of the
variable

Is This Answer Correct ?    8 Yes 0 No

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

Answer / mani

Hi peter This forum is for finding solutions. Not for
checking our Vocabulary

Is This Answer Correct ?    5 Yes 0 No

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

Answer / 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

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

Answer / saravanan

$message is a simple variabla.

$$message is variabla of variable(dynamic)

Is This Answer Correct ?    0 Yes 0 No

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

Answer / peter

Hi Peter ,

You may be the world number one english master ,

But dont loose your words in forums , it make very big pains ,

sorry my dear peter ,

Sorry to all

Is This Answer Correct ?    6 Yes 7 No

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

Answer / thomas

I tried this $$message is not working..

Is This Answer Correct ?    12 Yes 24 No

Post New Answer

More PHP Interview Questions

How can use sys time in loop?

0 Answers   Fengate,


What is full form of PHP?

0 Answers  


What is the difference between require_once and require in php?

0 Answers  


Why triggers are used in mysql?

0 Answers  


What is a model in php?

0 Answers  






How values in arrays are indexed?

0 Answers  


Do I need apache for php?

0 Answers  


What is the purpose of pear in php?

0 Answers  


hi sir am a fresher just learning LAMP COURSE linux,apache,mysql and php .just i finished my M.C.A 2009 passed out ..can any one tell after i finish this course how much salary we expect in any php based company ? and also tell please how much salary we can demand as a fresher with my M.C.A qualification as a PHP fresher in a company ? how much we get atleast mininum as a PHP fresher in CHENNAI and Bangalore just send ur valuable suggestions to kiranpulsar2007@gmail.com please guide to me sir

2 Answers  


Which escape sequences can be used in single quoted strings in php?

0 Answers  


What is $_ request?

0 Answers  


How to access a global variable inside a function?

0 Answers  


Categories