+ 3
are "variable variables" useful in real time scenario? and if they are then what kind of scenarios?
please give me any simple example to understand properly. thanks in advance
3 Answers
+ 1
i think you didn't get me. "variable variables" is one of the topic of php which switches its value with another variable (according to me its for no reason). it means suppose there are two boys (Joe and Josh) and if you call Joe then Josh will respond. what is the use of this functionality in real time?
- 1
waht u mind ? mybe php array(): ?
oder foreach (); that need php used
- 2
<?php
$test1 = array("age"=>"18", "color"=>"blue");
$test2 = array("age", "color") ;
echo $test2 [1].": ";
echo $test1["color"]."</br>";
// OUTPUT color: blue
?>