Wednesday 4 March 2015

Difference between $ and $$ in php

<?php

$test = "hello world";

$a = "test";



echo $$a;


?>

output :

hello world

note: $a  represents a variable
and $$a  represents a variable  with content (for example $test content it holds)




No comments:

Post a Comment