So I want to include a simple test function in my php app that goes something like this
I'll then call this at various points to output my variables on my webpage, just to see how everything is coming along.
What I want to do though is to output the name of the variable as well as it's value. So that when I call the function using something like this
how do I access the name of a variable as well as it's value ?
I hope this isn't too obvious and I'm just missing something really easy here ...
Code:
function test( &$value ){
echo ('<br><br> THE VALUE OF $VALUE IS:'.$value.'<br>');
}
What I want to do though is to output the name of the variable as well as it's value. So that when I call the function using something like this
Code:
test ($blog)
I get ...
THE VALUE OF BLOG IS :<value of blog here>
I hope this isn't too obvious and I'm just missing something really easy here ...