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

Which variable declarations within a class is invalid in php?

508


What is php and why it is used?

553


Difference between get and post method.

549


How the web server interprets php and interacts with the client?

508


What is php form validation?

556






What is the difference between core php and php?

503


Tell us how can we access the data sent through the url with the post method?

521


How to update memcached when you make changes to php?

542


I am trying to assign a variable the value of 0123, but it keeps coming up with a different number, what is the problem?

505


How can you make a connection with mysql server using php?

513


What are the benefits of using php and mysql?

513


What is self in php?

555


What are the encryption functions available in PHP?

571


sort term descripttion form, report and uery

1657


Why is facebook still using php?

576