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

Answers were Sorted based on User's Feedback



If the variable $a is equal to 5 and variable $b is equal to character a, what’s the value of..

Answer / rajkumar

<?php

//If the variable $a is equal to 5 and variable $b is equal
to character a, what’s the value of $$b?

$a =5;
$b=$a;
$c= $$b;
print_r($c);


?>


it will not display any answer so answer is wrong

Is This Answer Correct ?    3 Yes 4 No

If the variable $a is equal to 5 and variable $b is equal to character a, what’s the value of..

Answer / nickle

$a = 5
$b = 'a'
$$b=100
bcoz $$b is a reference to existing variable.as $b=100 by
ascii...it is true.........!!!!

Is This Answer Correct ?    2 Yes 5 No

If the variable $a is equal to 5 and variable $b is equal to character a, what’s the value of..

Answer / modi[achir communication]

<?
$a=5;
$b='a';
$$b=100;
$b is a simple variable and $$b is a reference variable that
means in memory $$b will be refer to $b. Suppose in memory
$b variable is in address 100 then $$b will be refer $b at
address 100 that means $$b will contain 100.
?>

Is This Answer Correct ?    11 Yes 15 No

If the variable $a is equal to 5 and variable $b is equal to character a, what’s the value of..

Answer / 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

If the variable $a is equal to 5 and variable $b is equal to character a, what’s the value of..

Answer / mr.kishore

<?php
$a=5;
$b='a';
$$b=100; // at this point $b='a' and when we use $ after
that '$$b becomes $a and we asign this value = 100 so $a
becomes 100;
echo $a;

Is This Answer Correct ?    6 Yes 37 No

Post New Answer

More PHP Interview Questions

Is string php function?

0 Answers  


What is http php?

0 Answers  


What is composer install?

0 Answers  


what is the scope of php in the future if any other language is developed then may be php is loss ???

1 Answers   ATI,


How to delete a file from the system?

0 Answers  


What is happening in the following code $objA = new A(); // A is a class $objB = $objA;

3 Answers   NIIT,


What is polymorphism php?

0 Answers  


how we can crop an image and how we can display it..

1 Answers   Satyam,


What is difference between include,require,include_once and require_once()?

0 Answers  


What is final in php?

0 Answers  


what is the current salary package in India for a PHP & MySQL programmer who has 3 years experience

127 Answers   ABC, BLG Logistics, Google, HCL, IBM, Infosys, People Group, PHP, Torque Infotech, V Angelz Technologies, Yahoo,


Is php secure?

0 Answers  


Categories