×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: PHP
Posted by: userc93fe
Added: Jul 21, 2014 2:48 PM
Views: 22
Tags: no tags
  1. function DebugMsg ($text, $level = 1) {
  2.    
  3.     global $DebugLevel;
  4.  
  5.     if (! isset($DebugLevel)) {
  6.         $DebugLevel = 0;
  7.     }
  8.    
  9.     if ($DebugLevel >= $level ) {
  10.         if (is_array($text)) {
  11.             echo "Contents of Array: <BR>";
  12.             print_r ($text);
  13.             echo "<BR>";
  14.         } else {
  15.             echo "$text<BR>";
  16.         }
  17.     }
  18. }