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 is the delimiter default in PHP?

603


What does explode do in php?

544


What are php expressions?

591


Tell me what is the actually used php version?

554


Explain the different types of errors in php.

521






How check variable is set or not in php?

451


What is meant by pdo in php?

544


How to execute a php script from the command line?

554


How to stop the execution of php script?

518


Which function would you use to read a line of data from a file in php?

557


What is the use of die in php?

515


Tell me when a conditional statement is ended with an endif?

494


How is a session id generated?

523


Why php was called as personal home page?

536


Which variable declarations within a class is invalid in php?

501