Java Coder
difference between $message and $$message
1 Answer(s)      4 years and 9 months ago
Posted in : PHP

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

Advertisement
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.










Related Tutorials/Questions & Answers:
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
What is the difference between $message and $$message?
What is the difference between $message and $$message?  What is the difference between $message and $$message
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
Java Message Services - JMS
Java Message Services  What is Java Message Services
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
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
Javascript alert message
Javascript alert message   How to send an alert message to a user in JavaScript
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
Message Resource Bundle work.
Message Resource Bundle work.  How does Value replacement in Message Resource Bundle work
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
websphere message broker - WebSevices
websphere message broker  how can i find the heapsize of the execution group in the message broker using command console syntax
soap message console - WebSevices
soap message console  hi friends i have one doubt that is iam using MyEclipse 6.0 in that how do i get soap message console
GETTING ALERT MESSAGE
GETTING ALERT MESSAGE  how to get an alert message when radio button is selected instead of checkbox
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
forward error message in struts
forward error message in struts  how to forward the error message got in struts from one jsp to other jsp?   Hello Friend, Use <%@ page.... The code errorPage="errorPage.jsp" forwards the exception message
A Message-Driven Bean Example
A Message-Driven Bean Example   ... messages asynchronously,  a Message-driven bean is used. Message driven..., email or IM messages). In message driven beans, the messaging service
validation message - Struts
validation message  sir, i took help of that example but in that we change only color of the message i want to shift the place of the error message.means all messages are put together at top of the form
pop up message in java
pop up message in java  hii..i have developed an application in which a login and registration form is there.when the registration is done the user... an automatic message to change the password.how is it done??the forms are done using java
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
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
error message - Java Beginners
error message  sir, while i m trying to execute my first program(print my name)I get error message like" javac is not recognized as internal or external ...blah..blah..or batch file".even i hav tried setting the path variable
Java message services
; Java Message Services In this section, you will read about the java... and offers the basics for developing programs using it. The java message services API is a java Message oriented Middleware API for sending successfully the messages
Ejb message driven bean
.style1 { color: #FFFFFF; } Ejb message driven... you the process which are involved in making a message driven bean using EJB...; For developing the message driven bean we are using both the EJB module and web
difference between == and === operators?
difference between == and === operators?  Is (====) operator available in java or not? difference between
Difference between struts and JSF
Difference between struts and JSF  What is the difference between struts and JSF
difference between ForwardAction and IncludeAction
difference between ForwardAction and IncludeAction  What is the difference between ForwardAction and IncludeAction
difference between SessionState and ViewState
difference between SessionState and ViewState  What is the difference between SessionState and ViewState
Difference between DispatchAction and LookupDispatchAction
Difference between DispatchAction and LookupDispatchAction  What is the Difference between DispatchAction and LookupDispatchAction