Posted by Carl on 11/08/06 18:29
howa wrote:
> e.g.
>
> $a = 1;
> $b = 2;
>
> i want to get all the variables defined in the current scope, is it
> possible?
>
> thanks...
Howa,
Have you looked at the get_defined_vars() function? From the docs:
"This function returns a multidimensional array containing a list of
all defined variables, be them environment, server or user-defined
variables, within the scope that get_defined_vars() is called."
http://www.php.net/manual/en/function.get-defined-vars.php
Carl.
[Back to original message]
|