Posted by Tom on 12/14/06 21:34
Sorry, I should have been more specific -- I need the actual name of
the variable itself, not its datatype. So, I need function that does
the following:
<?php
$myArray = array( );
$myVariable = "foobar";
echo some_function($myArray); // should echo "myArray"
echo some_function($myVariable); // should echo "myVariable"
?>
Josh wrote:
> string gettype ( mixed var )
>
> this function will return the variable type in string format.
>
> Thanks
>
> Tom wrote:
> > Is there a function to get a variable to return its name w/datatype of
> > string? i.e.:
> >
> > $var would return "var"
[Back to original message]
|