Re: Is there a way to get a variable name as a string?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Rasmus Lerdorf wrote:
Daevid Vincent wrote:

Is there a way to get the name of a variable as a string? For example...


Nope, not possible.

Well....

ob_start();
echo '$var';
$contents = ob_get_contents();
ob_end_clean();

echo 'Variable Name is : '.substr($contents,strpos($contents,'$')+1);

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux