If the variable $a is equal to 5 and variable $b is equal to character a, what’s the value of $$b?
the answer to this question is give as 100 can any one please tell me how?
elanorejoseph
0
Light Poster
Recommended Answers
Jump to PostI did a simple script and found that was not the case.
<?php $a=5; $b=$a; echo $$b; ?>
Found that $$b will be blank because it will search for the variable $5 and it is impossible to make a variable with that name.
Jump to PostIf the variable $a is equal to 5 and variable $b is equal to character a, what’s the value of $$b? the answer to this question is give as 100 can any one please tell me how?
$a = 5; $b = 'a'; echo …
All 5 Replies
cwarn23
387
Occupation: Genius
Team Colleague
Featured Poster
network18
15
Practically a Master Poster
elanorejoseph
0
Light Poster
network18
15
Practically a Master Poster
elanorejoseph
0
Light Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.