Re: [PHP] Finer points of debugging: vardump vs. print_r

2001-04-10 Thread John
Hi Morgan, You tip is fantastic. Will post it (with your permission) at my weblog, http://php.weblogs.com/ tomorrow. Regards, John "Morgan Curley" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I generally include the following function: function

Re: [PHP] Finer points of debugging: vardump vs. print_r

2001-04-09 Thread Philip Olson
Here's some info about the two functions. Descriptions (from manual) : print_r -- Prints human-readable information about a variable (PHP 4) var_dump -- Dumps information about a variable (PHP 3 = 3.0.5, PHP 4) An example

Re: [PHP] Finer points of debugging: vardump vs. print_r

2001-04-09 Thread Morgan Curley
I generally include the following function: function dump( $label, $input ){ echo( "PRE" ); echo( "H2$label/H2\n" ); print_r( $input ); echo( "/PRE" ); return 1; } or if you like javascript

Re: [PHP] Finer points of debugging: vardump vs. print_r

2001-04-09 Thread Plutarck
I use print_r on arrays, and var_dump on everything else. print_r will not tell you if a variable is NULL, but var_dump will. So I usually use both. -- Plutarck Should be working on something... ...but forgot what it was. ""John Lim"" [EMAIL PROTECTED] wrote in message 9asuq0$f1n$[EMAIL