Posted By

andyhartleeds on 03/23/10


Tagged

recursive debugging pre printr


Versions (?)

Print recursive in pre-formatted tags


 / Published in: PHP
 

  1. <?php
  2. /**
  3.  * Wraps content in <pre> tags. Useful for using with arrays of data.
  4.  *
  5.  * @version 1.0
  6.  * @author Andrew Hart
  7.  *
  8.  * @param string $content The content to wrap in <pre> tags.
  9.  */
  10. function pre_wrap($data)
  11. {
  12. echo '<pre>' . print_r($data, true) . '</pre>';
  13. }
  14. ?>

Report this snippet  

You need to login to post a comment.