Can you please explain the difference between $message and $$message?
Submitted by: AdministratorThey are both variables. But $message is a variable with a fixed name. $$message is a variable who's name is stored in $message. For example, if $message contains "var", $$message is the same as $var.
$message is a simple variable whereas $$message is a reference variable. Example:
$user = 'bob'
is equivalent to
$holder = 'user';
$$holder = 'bob';
Submitted by:
$message is a simple variable whereas $$message is a reference variable. Example:
$user = 'bob'
is equivalent to
$holder = 'user';
$$holder = 'bob';
Submitted by:
Read Online PHP Developer Job Interview Questions And Answers
Top PHP Developer Questions
☺ | Described PHP? |
☺ | What is PEAR in PHP? |
☺ | How you can protect special characters in Query String? |
☺ | Described session in PHP? |
☺ | Described the functionality of the function strstr and stristr? |
Top Computer Programming Categories
☺ | Python Interview Questions. |
☺ | Software engineering Interview Questions. |
☺ | OOP Interview Questions. |
☺ | PHP Interview Questions. |
☺ | VBA (Visual Basic for Applications) Interview Questions. |