Posted By

Omegakenshin on 12/30/11


Tagged


Versions (?)

Preprint


 / Published in: PHP
 

USAGE: preprint($x); <- where $x = array().

The optional 2. parameter can be set to "true", so the html-code is returned.

by - Robert Heine

  1. <?php
  2. if (!function_exists("preprint")) {
  3. function preprint($s, $return=false) {
  4. $x = "<pre>";
  5. $x .= print_r($s, 1);
  6. $x .= "</pre>";
  7. if ($return) return $x;
  8. else print $x;
  9. }
  10. }
  11. ?>

Report this snippet  

You need to login to post a comment.