PHP Catch Echo Output

<?php
ob_start(); // Start output buffering

Render::UnorderedList(Class::getItems(), Class::getFields(), true); 

$list = ob_get_contents(); // Store buffer in variable

ob_end_clean(); // End buffering and clean up

echo $list; // will contain the contents
 ?>
Motionless Mole