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 ?    97 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 ?    72 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 do you remove duplicates from an array?

0 Answers  


what is used for tmp table in oracle?

0 Answers  


What is whitespace in php?

0 Answers  


Tell me what is the definition of a session?

0 Answers  


How to print \ in php. Only \ with out using . or *.

7 Answers   American Solutions,






A company named Pensar Technologies in chennai has offered me a job as Software Trainee in chennai.But they are asking to pay demand draft of Rs.75000/- in the name of the company.They are saying the gross renumeration will pay Rs.90000/- annually.I want to know whether this is good or bad company?Help me out in this.

18 Answers  


How is it possible to know the number of rows returned in result set?

0 Answers  


When to use inquire vs enquire?

0 Answers  


How to add 301 redirects in PHP?

0 Answers  


Can we embedded directly PHP code into XHTML document? State Whether True or False?

0 Answers  


How do I see how many pages per session in google analytics?

0 Answers  


Which of the following represents the proper way to set a session variable? Answer: a. $_SESSION['foo'] = 'bar'; b. session_start(); c. session_set_save_handler ('myopen', 'myclose', 'myread', 'mywrite', 'mydelete', 'mygarbage'); d. $foo = $_SESSION['foo']; 2.When administering MySQL, you should make the data directory accessible via the operating system 3.which statement can be used to determine how the optimizer resolves a query

9 Answers   Cybercom, TCS,


Categories