Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
Differences between Simple Variables and Variable Variables
What is the difference between $message and $$message in PHP?
✍: FYIcenter
$message is a simple variable with a fixed name which is called "message".
$$message is a variable variable with a variable name which is stored in another variable called $message.
If $message contains "user", $$message is the same as $user. For example, this code will produce "bob" and "bob":
<?php $holder = 'user'; $$holder = 'bob'; echo $$holder; echo $user; ?>
2007-02-27, 5349👍, 0💬
Popular Posts:
What will be printed as the result of the operation below: main() { int x=20,y=35; x=y++ + x++; y= +...
How To Run a JUnit Test Class? A JUnit test class usually contains a number of test methods. You can...
How does multi-threading take place on a computer with a single CPU? The operating system's task sch...
How many bits are used to represent Unicode, ASCII, UTF-16, and UTF-8 characters? Unicode requires 1...
If we inherit a class do the private variables also get inherited ? Yes, the variables are inherited...