What is difference between $x and $$x

Answer Posted / chinuku

$var is a variable and $$variable is a Reference or Dynamic
variable
ex:$var="test";
$test="php";
<?php
echo $var;
echo $$var;
?>
ans
$var=test;
$$var=php;

Is This Answer Correct ?    22 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Does php pass arrays by reference?

561


What are default session time and path?

557


Why use static methods php?

534


What is difference between html and php?

498


How long do php sessions last?

556






How would you determine the size of a file in php?

589


Which is the best web server?

524


What is pdo in php why use?

490


Is php pass by reference or value?

532


Which is not a php magic constant?

572


What advance thing in php7?

519


How a constant is defined in a php script?

560


How to call javascript function in php without any event?

489


How cookies are transported from browsers to servers?

494


What does isset() function?

537