View Single Post
Old 10-21-2003, 04:49 PM   #2 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,532
sde is on a distinguished road
how about stepping back and taking a different approach .. instead of messing with the range before the range is set .. how about adding conditions inside your loop... you would need to make a $max_value variable though.

PHP Code:
$max_value 250;
$range range(($page-3), ($page+3));

foreach (
$range as $value) {
  if((
$value 0) && ($value < ($max_value 1))){
    if (
$value == $page) {
        echo 
"[$value]&nbsp;\n";
    } else {
        echo 
"<a href=\"{$_SERVER['PHP_SELF']}?page=$value\">$value</a>&nbsp;\n";
    }
  }

__________________
Mike
sde is offline   Reply With Quote