What is the difference between $message and $$message ?
Answer Posted / prasad
$message is variable and $$message is variable variable.
$message="hello";
$$message="world";
echo $hello; // prints world
echo ${$message} //prints world
variable variable cant be used in php superglobalarray. and
cant use in functions and within classes
| Is This Answer Correct ? | 25 Yes | 6 No |
Post New Answer View All Answers
Can we use session in mvc?
Tell me how can we get the error when there is a problem to upload a file?
How to find a specific value in an array?
How can we enable error reporting in php?
What are differences between PECL and PEAR?
What is the $_ server php_self variable?
Tell me how comfortable are you with writing html entirely by hand?
What are php parameters?
Is age nominal or ordinal?
Tell me what sized websites have you worked on in the past?
Which function would you use to read a line of data from a file in php?
can we swap two different string using php for example:-- before swapping:-- 1 string :-hello friend, 2 string :-my dear, after swapping that strings will be: 1.hello dear, 2.my friend.
What are the differences between session and cookie?
Which escape sequences can be used in single quoted strings in php?
What is csrf verification?