NYCPHP Meetup

NYPHP.org

[nycphp-talk] Output name of Variable

Steven Samuel steven at sohh.com
Fri Jan 31 16:42:27 EST 2003


I think the easiest way to accomplish this would be instead of assigning to
a variable, assign it to an associative array. This way you can name the
array whatever you'd like and cycle through the name using a foreach loop.

Steven Samuel
SOHH.com

-----Original Message-----
From: Jim Musil [mailto:jim at nettmedia.com]
Sent: Friday, January 31, 2003 12:38 PM
To: NYPHP Talk
Subject: [nycphp-talk] Output name of Variable



It seems like it would be helpful if there were a way to grab the name
assigned to a variable and output it. Is there already a function like this?

I would use this mainly for tracing and reporting. So, if I had a simple
function show_variable($var), it would not only output the value assigned to
the variable, but would also show the name of the variable itself.

Am I missing it?


Jim Musil
<jim at nettmedia.com>
Nettmedia, Senior Developer
345 Seventh Ave., 24th Floor.
New York, NY 10001
Tel. 212.629.0004 x 131



--- Unsubscribe at http://nyphp.org/list/ ---






More information about the talk mailing list