Skip to content

Instantly share code, notes, and snippets.

@barnabywalters
Created December 26, 2012 20:44
Show Gist options
  • Save barnabywalters/4382985 to your computer and use it in GitHub Desktop.
Save barnabywalters/4382985 to your computer and use it in GitHub Desktop.
<?php
$render = function ($_path, $data) {
extract($data);
unset($data);
require $_path;
};
ob_start();
$render($_path, $data);
$buffer = ob_get_contents();
ob_end_clean();
// EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment