Stretchwickster
Programmer
I've searched quite extensively for some way of printing a variable's name and value as a debugging aid, to save the following code insertions:
I'd prefer to be able to write a function so that the call could simply be:
I'm sure this should be quite straightforward but I haven't been able to work it out so far, so your advice would be much appreciated!
Clive
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"To err is human, but to really foul things up you need a computer." (Paul Ehrlich)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To get the best answers from this forum see: faq102-5096
Code:
<?php
echo 'VarName: ' . $VarName;
?>
Code:
<?php
debug_var($VarName);
?>
Clive
![Runner_1Revised.gif](http://dev.slydance.com/images/Runner_1Revised.gif)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"To err is human, but to really foul things up you need a computer." (Paul Ehrlich)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To get the best answers from this forum see: faq102-5096