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
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
2 matches
Mail list logo