{
            global $bad_utf8_chars;
            return is_array($array) ? array_map('_remove_bad_characters', $array) : str_replace($bad_utf8_chars, '', $array);
        }
        $_GET = _remove_bad_characters($_GET);
        $_POST = _remove_bad_characters($_POST);
        $_COOKIE = _remove_bad_characters($_COOKIE);
        $_REQUEST = _remove_bad_characters($_REQUEST);
    }
    remove_bad_characters();
    include 'PubMedAPI.php';
    $PubMedAPI = new PubMedAPI();
    if (isset($_GET['page'])) {
        $PubMedAPI->retstart = $PubMedAPI->retmax * ((int) $_GET['page'] - 1) + 1;
    }
    $results = $PubMedAPI->query($term, false);
}
?>

<?php 
if (!empty($results)) {
    ?>
	<p>Search results for <strong><?php 
    echo urldecode($PubMedAPI->term);
    ?>
</strong> (<?php 
    echo $PubMedAPI->count;
    ?>
 results, showing max 5)</p>
	<table border="0" cellspacing="0" cellpadding="0">
		<tr>