Share on Google+Share on Google+

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

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

Ads

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
how to send message
how to send message  how to send message for mobile in server
javascript dom error-message
javascript dom error-message  javascript dom error-message
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 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 DispatchAction and LookupDispatchAction
Difference between DispatchAction and LookupDispatchAction  What is the Difference between DispatchAction and LookupDispatchAction
difference between == and === operators?
difference between == and === operators?  Is (====) operator available in java or not? difference between
difference between SessionState and ViewState
difference between SessionState and ViewState  What is the difference between SessionState and ViewState
Tutorials   
Java Spring Hibernate Struts Training I am Java programmer. Should I learn Java Script or Python? Delete multiple records with pagination by selecting checkboxes How to add one hour in php date? connection in php connection in php connection in php PHP magento how to make previous and next Button Display Data in php session written exam display database results question create a simple form Magento Strings in PHP Zend Framework Installation in xampp? How to prevent adding duplicate items to the shopping cart php problem maximum execution time of 30 seconds exceeded in php Call-time pass-by-reference has been removed in HTTP_POST_VARS is deprecated $_GET[] index is not defined Function mysql_db_query() is deprecated Function mysql_db_query() is deprecated Function split() is deprecated Fatal error: Call to undefined function session_register() in .php file php tag not working Error reporting in PHP Why are MySQL Routines and Views not used with PHP? How to add Click to copy function to my wordpres blog? connection of php to MySQL. loan calculator Datepicker not getting called through include function of php change url string integrate login in php Installation of wamp server Display PHP clock with user input date and time value in div from php, reloading form pre-populate form developing a system using php n mysql Configure apache Tomcat to work with Eclipse and PDT in php How to display a file for 24 hours? LOGIN ERROR LOGIN FAILED", $_SESSION['login fail']='0',}?> I GOT ERROR FOR MY PROJECT PHP Sending emails and insert into trable Tutorial college Student Admission System PLZ HELP ME. i need php code.

Ads

 
Advertisement null

Ads