Re: [PHP] RE: Printing structure and data of array

2002-01-22 Thread matthias.stache
how about: function debugPrint($mVar, $bHtml) { global $HTTP_REFERER; if (is_array($mVar)){ $sTemp = "Array"; } if (is_bool($mVar)){ $sTemp = "Bool"; } [snip] ... $sFunction = "debugPrint$sTemp"; //getting the function to call to $sFunction($sTemp,$mVar,$bHtml); //calls the fu

Re: [PHP] RE: Printing structure and data of array

2002-01-22 Thread matthias.stache
Use this: function debugPrint($mVar, $bHtml) { if ($bHtml){ echo ""; print_r ($mVar); echo ""; } else { print_r ($mVar); } } call it like this: debugPrint($yourVariable,1); This will print out any type (object,array,ressource,string...) - Original Message - From: "Sandeep