montyauto
Joined: 31 Dec 2006 Posts: 72
|
Posted: Sun Jun 17, 2007 11:53 am Post subject: Can I get a variable name as a string? |
|
|
I've searching in php and perl for this:
how do i get a variable name as a string e.g i have a variable
[code:1]$myvar = 42;[/code:1]
i want to get 'myvar'
cause i want to display the variable name as the code result:
[code:1]
$name = 'john';
$age = 42;
[/code:1]
I want to display it later using:
[code:1]
print 'hey friend his $myvar1 is $name, his $myvar2 is $age years old';
[/code:1]
it will display
[code:1]hey friend his name is john, his age is 42 years old[/code:1]
is it possible? _________________ Get 1 Million 'Guaranteed' Real Visitors, FREE! |
|