Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...



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


Please Help Members By Posting Answers For Below Questions

What are the advantages of object-oriented programming in php?

919


What is the difference between apache and tomcat?

1007


What are PHP Magic Methods/Functions. List them.

1057


Explain the visibility of the property or method?

1019


How to parse configuration file in php?

1021


How is traits used in php?

990


What is putenv?

1007


How can cross site request forgery csrf be prevented?

930


Which framework is best for php?

966


How to specify argument default values?

973


Is there an easy way to delete an element from a php array?

928


What is warning – “cannot modify header information – headers already sent”?

1069


How can you retrieve data from the mysql database using php?

1038


Does php pass arrays by reference?

1098


Write a program using while loop?

1026