Categories:
.NET (357)
C (330)
C++ (184)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (2)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Struts (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, 6244👍, 0💬
Popular Posts:
Does it matter in what order catch statements for FileNotFoundException and IOExceptipon are written...
Can you explain project life cycle ? Figure :- 12.2 Life cycle of a project There are five stages of...
What is a fish bone diagram ? Dr. Kaoru Ishikawa, invented the fishbone diagram. Therefore, it can b...
How To Use "IN OUT" Parameter Properly? - Oracle DBA FAQ - Creating Your Own PL/SQL Procedures and F...
Can a variable be both const and volatile? Yes. The const modifier means that this code cannot chang...