Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php echo variable name

function print_var_name($var) {
    foreach($GLOBALS as $var_name => $value) {
        if ($value === $var) {
            return $var_name;
        }
    }

    return false;
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #php #echo #variable
ADD COMMENT
Topic
Name
6+6 =