Posted By

Knarf on 11/15/09


Tagged

echo pre vardump


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

aleksanderek
jlan


pre_dump()


 / Published in: PHP
 

A function for quicly echo'ing "< pre> " around a var_dump of a variable

  1. /*
  2.  *
  3.  * Propably one of the most usefull function of all times.
  4.  * The only thing it does is to var_dump an variable but wraps an pre-tag around it.
  5.  *
  6.  */
  7.  
  8. function pre_dump()
  9. {
  10. foreach( func_get_args() as $item ) {
  11. echo '<pre>';
  12. var_dump($item);
  13. echo '</pre>';
  14. }
  15. }

Report this snippet  

You need to login to post a comment.