|
Posted by Toby A Inkster on 03/06/07 13:08
Jerry Stuckle wrote:
> I agree, Tony.
Jerry, surely we've been posting in the same groups for long enough by now
for you to have learnt how to spell my name?
> echo statements work quite well.
function debug_them ()
{
for ( $i=1 ; $i<func_num_args() ; $i++ )
{
$val = func_get_arg($i);
if (is_array($val))
print_r($val);
else
print $val;
print "\n----\n";
}
if (func_get_arg(0)) exit();
}
usage:
debug_them(FALSE, $_SESSION, $some_array, $some_var);
debug_them(TRUE, $_POST);
The first parameter says whether the script should exit after outputting
the other parameters.
--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact
Geek of ~ HTML/SQL/Perl/PHP/Python*/Apache/Linux
* = I'm getting there!
Navigation:
[Reply to this message]
|