if ($ct >= 7 && $ct<=37) {
if ($gallery["date"] == $blag) {
} else {
echo "<br><FONT face=\"verdana,helvetica\" size = \"1\"><b>",$gallery["date"],"</b></font><br>";
$ct++;
}
echo "<font face=\"Verdana,Arial,Helvetica\" size=\"1\"><a href=\"",$gallery["url"],"\">",$gallery["name"],"</a></font><br>";
$blag = $gallery["date"];
}

Im trying to make it so that I can show every 30 days on a different page the above coding does it for days 7-37 but i need the script to generate links for every 30 pages