LPMJ Example 4-17 (Click on the icon to view the source for copy and pasting)
<?php
if ($finished == 1 OR getnext() == 1) exit;
?>