PHP Output Buffering


SUBMITTED BY: Guest

DATE: April 30, 2013, 9 a.m.

FORMAT: Text only

SIZE: 256 Bytes

HITS: 1141

  1. <?php
  2. ob_start();
  3. echo 'Print to the screen!!!';
  4. $getContent = ob_get_contents();
  5. ob_end_clean();
  6. // Do whatever you want...
  7. // Do something with the printed content (only if you want)...
  8. echo 'Now: ' . $getContent;

comments powered by Disqus