Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa PHP What is the difference between $message and $$message?
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


brijesh
What is the difference between $message and $$message?
1 Answer(s)      3 years and 10 months ago
Posted in : PHP


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


Advertisement
View Answers

November 13, 2010 at 3:45 PM


$Message = "first";
$first= "second";

echo $message //Output   first
echo $$message //output  second

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

A variable of variable allows us to change the name of variable dynamically.

Thanks



Related Tutorials/Questions & Answers:
Advertisements
Advertisements
 

 

 

DMCA.com