Updated output.php to work with updated php