Created
February 7, 2016 20:24
-
-
Save fgilio/885b4a170a1050e1cffb to your computer and use it in GitHub Desktop.
PHP - Save Output Buffer to $string
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
ob_start(); | |
// Run code with here, must include 'echo' or alike | |
$output = ob_get_contents(); | |
ob_end_clean(); | |
// Process Output Buffer, save in DB, etc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment