If the variable $a is equal to 5 and variable $b is equal to
character a, what’s the value of $$b?
Can anyone explain how's the value of $$b=100
Answer Posted / annonymus
<?php
$a=5;
echo $b='a'."<br/>";
echo $$b;
?>
output is neither 5 or 100,
it displays
a
but if you try this...
<?php
$user = 'bob';
$holder = 'user';
echo $$holder;
?>
answer becomes like this..
bob
try it....this really really confusing..anyone can give the
exact solution to this????
| Is This Answer Correct ? | 1 Yes | 6 No |
Post New Answer View All Answers
What are the advantages of object-oriented programming in php?
What is the difference between apache and tomcat?
What are PHP Magic Methods/Functions. List them.
Explain the visibility of the property or method?
How to parse configuration file in php?
How is traits used in php?
What is putenv?
How can cross site request forgery csrf be prevented?
Which framework is best for php?
How to specify argument default values?
Is there an easy way to delete an element from a php array?
What is warning – “cannot modify header information – headers already sent”?
How can you retrieve data from the mysql database using php?
Does php pass arrays by reference?
Write a program using while loop?