Hope someone could help, should be easy
I have this code to limit number of shown pages for my pagination, but it doesnt work. Any other ideas how to set condiditin AND codition?? As in this code:
if ($pages < $page - 3 || $pages > $page + 3) return;
The whole script is: should work, but it doest, going mad from it ???
function page($url) {
global $page;
$pages=1;
for ($starter=0; $this->total>$starter; $starter+=$this->limit) {
if ($pages != $page)
echo "<a href=\"".$url.$pages."\" class=\"page\">$pages</a> \n";
else
echo "<b>[ $pages ]</b> \n";
$pages++;
if ($pages < $page - 3 || $pages > $page + 3) return;
}
}