-1

Possible Duplicate:
Construct a PHP variable name based on other variable values and static text

$value = '200';
$_200 = 'other';

How could I echo the contents of the second variable, getting its name from the first variable? So basically read the value of $value, prepend an _ and use it as a variable name.

1

1 Answer 1

3

Same as always.

echo ${'_'.$value};
Sign up to request clarification or add additional context in comments.

1 Comment

Got knowledge form you , Thanks !

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.