What is difference between $x and $$x

Answer Posted / psharma05

$x is a simple variable where $$x means value of $x becomes other variable.
eg.
$x="hello";
$$x="hi";
echo $hello;

output will be:
hi

Is This Answer Correct ?    11 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What happens if an expected input field was not submitted?

529


Please explain is it possible to use com component in php?

556


How cookies are transported from browsers to servers?

497


What is the main difference between php 4 and php 5?

535


What is new static in php?

534






How come the code works, but does not for two-dimensional array of mine?

502


What language is similar to php?

556


How to call javascript function in php without any event?

495


What is encapsulation in php with example?

558


Tell me how can we define a variable accessible in functions of a php script?

527


Tell me what is the difference between exception::getmessage and exception::getline?

509


How to concatenate two strings in php?

538


What is die in php?

561


What is the difference between fopen() and fclose()?

588


Which function would you use to replace a record in a database in php?

587