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

What is symfony php?

526


How to store the uploaded file to the final location?

516


How many types of arrays are there in php?

537


Is it possible to remove the html tags from data?

529


What is orm in php framework?

497






Can I use php in html?

558


Which php mvc framework is best?

565


What is the main difference between require() and include()?

476


How to get the number of characters in a string?

567


How to get the http request in php?

574


What is laravel php?

537


> symbol is used to redirect the output of a command. State Whether True or False?

656


How can we check the value of a given variable is alphanumeric?

541


Why php 7 is faster?

511


Is php an oop?

521