Say i have this PHP code:
$FooBar = \"a string\";
i then need a function like this:
print_var_name($FooBar);
I was looking for this but just decided to pass the name in, I usually have the name in the clipboard anyway.
function VarTest($my_var,$my_var_name){ echo '$'.$my_var_name.': '.$my_var.''; } $fruit='apple'; VarTest($fruit,'fruit');