Debug Variable Function


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. function debugVar($var = null, $prefix = null)
  2. {
  3. if(is_array($var))
  4. echo "<pre>$prefix ", print_r($var), "</pre>";
  5. else
  6. echo "<pre>$prefix $var</pre>";
  7.  
  8. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.