difference between $message and $$message

Ads
 

difference between $message and $$message

What is the difference between $message and $$message?

View Answers

December 27, 2010 at 1:36 PM

Hi friends,

$message is a simple variable whereas $$message is a reference variable. Example: $name = 'Bharat';

is equivalent to

$str = 'name'; $$str = 'Bharat';

Example:

<html>
<head>
<title>First PHP Example </title>
</head>
<body>
<?php

/*----------------- First -----------------*/
$name="bharat";
echo $name;
echo "<br>";

/*-----------------Second -----------------*/
$str = 'name';
echo $str;
echo "<br>";
$$str;
echo  $$str;
?>
</body>
</html>

Thanks.

Ads









Related Tutorials/Questions & Answers:
What is the difference between $message and $$message?
What is the difference between $message and $$message?  What is the difference between $message and $$message
difference between $message and $$message
difference between $message and $$message  What is the difference between $message and $$message?   Hi friends, $message is a simple variable whereas $$message is a reference variable. Example: $name = 'Bharat
Advertisements
message passing
message passing  how message is passed using jade technology
message box
message box  How to show the message "invalid username and password" after redirecting the page to the login form
Difference between struts and JSF
Difference between struts and JSF  What is the difference between struts and JSF
difference between == and === operators?
difference between == and === operators?  Is (====) operator available in java or not? difference between
How to develope web service with exachanging xml message between computers using SOAP
How to develope web service with exachanging xml message between computers using SOAP  Hi Friends, I want to developed a webservice using soap... program in order to receive the message and client side program in order
Difference between 3d and 4d
Difference between 3d and 4d  what is the difference between 3d and 4d
What is the difference between the >> and >>> operators?
What is the difference between the >> and >>> operators?   hi, What is the difference between the >> and >>> operators? Thanks
Objective C Message Passing
Objective C Message Passing  What exactly a message passing means in Objective C? and how can i pass a message to a method
Difference between Timer and Thread?
Difference between Timer and Thread?  Can anyone tell me about the difference between Timer and Thread, Why we need to have Timer in case we have Thread implimentation startegy in Java
Message Context in AXIS
Message Context in AXIS  Is there any method in Axis classes to het the size of IN and OUT Message Conetext
Javascript alert message
Javascript alert message   How to send an alert message to a user in JavaScript
what is the difference between extends and implements
what is the difference between extends and implements  difference between extends and implements
what is the difference between extends and implements
what is the difference between extends and implements  difference between extends and implements
ModuleNotFoundError: No module named 'message'
ModuleNotFoundError: No module named 'message'  Hi, My Python... 'message' How to remove the ModuleNotFoundError: No module named 'message... to install padas library. You can install message python with following command
difference between lock and synchronization
difference between lock and synchronization  Hi, I am new in java please anyone tell me difference between lock and synchronization in java. its urgent. Thank in advance   Please visit the following link: Lock
Difference between SCJP Exams
Difference between SCJP Exams  What is the differences between SCJP 5 (310 - 055) exam and SCJP 6 (310 - 065) exam??? Thank You In Adv
javascript dom error-message
javascript dom error-message  javascript dom error-message
how to send message
how to send message  how to send message for mobile in server
Java Message Services
. JMS Message: An object that contains the data being transferred between... Java Message Services      ... for developing programs using it. The java message services API is a java Message oriented
GETTING ALERT MESSAGE
GETTING ALERT MESSAGE  how to get an alert message when radio button is selected instead of checkbox
what is the Difference between weblogic and jboss?
what is the Difference between weblogic and jboss?  what is the Difference between weblogic and jboss
what is the difference between pop and oop
what is the difference between pop and oop  what is the difference between pop and oop
difference between hashcode,reference in java
difference between hashcode,reference in java  difference between hashcode,reference in java
What is the difference between hibernate and spring
What is the difference between hibernate and spring  Hi, What is the difference between hibernate and spring. Thanks
message driven bean example
message driven bean example  can any one tell me how to develop and execute ---------- j2ee message driven bean example in weblogic server with (netbeans or eclipse).   Have a look at the following link: http
GETTING AN ALERT MESSAGE
GETTING AN ALERT MESSAGE  how to get an alert message, if i select radio button instead of checkbox(associated with 3 dropdown list
What is the difference between a constructor and a method?
What is the difference between a constructor and a method?  Hi, What is the difference between a constructor and a method?   Hi, I have found a good link of Java program related to difference between constructor
Difference between http and https
Difference between http and https  Difference b/w HTTP and HTTPS please provide answer in tabular form.   Hi Friend, Differences: 1)HTTP is hyper text transfer protocol which is responsible for transmitting
Message Driven Beans
Message Driven Beans       Message driven beans are the light weight components used for communication. In message driven beans the messaging service is in asynchronous mode because

Ads