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

If the variable $var1 is set to 10 and the $var2 is set to the character var1, what's the value of $$var2?

961


Where is session value stored?

993


Is it possible to protect special characters in a query string?

996


Tell me what does the initials of php stand for?

966


How can I make a script that can be bilingual (supports english, german)?

1017


How can I embed a java program in php file and what changes have to be done in php.ini file?

962


What is in php 7?

1019


Does php have future?

969


Does php need apache?

937


What is the difference between html and php?

992


What is html used for?

1014


How to download and install php for windows?

1035


What is ci framework in php?

1022


What distinguishes php from something like client side java script?

1035


What are arguments in php?

1015