public function numbers($link, $current, $reversed = false)
    {
        $r = '';
        $range = floor(($this->max_items - 1) / 2);
        if (!$this->max_items) {
            $page_nums = range(1, $this->pages());
        } else {
            $lower_limit = max($this->get - $range, 1);
            $upper_limit = min($this->pages(), $this->get + $range);
            $page_nums = range($lower_limit, $upper_limit);
        }

        if ($reversed) {
            $page_nums = array_reverse($page_nums);
        }

        foreach ($page_nums as $i) {
            if ($this->get == $i) {
                $r .= str_replace('{nr}', $i, $current);
            } else {
                $r .= str_replace('{nr}', $i, $link);
            }
        }
        return $r;
    }
public function numbers($link, $current, $reversed = false)
    {
        $r = '';
        $range = floor(($this->max_items - 1) / 2);
        if (!$this->max_items) {
            $page_nums = range(1, $this->pages());
        } else {
            $lower_limit = max($this->get - $range, 1);
            $upper_limit = min($this->pages(), $this->get + $range);
            $page_nums = range($lower_limit, $upper_limit);
        }

        if ($reversed) {
            $page_nums = array_reverse($page_nums);
        }

        foreach ($page_nums as $i) {
            if ($this->get == $i) {
                $r .= str_replace('{nr}', $i, $current);
            } else {
                $r .= str_replace('{nr}', $i, $link);
            }
        }
        return $r;
    }
public function numbers ( $ link , $ current , $ reversed = false ) { $ r = '' ; $ range = floor ( ( $ this -> max_items - 1 ) / 2 ) ; if ( ! $ this -> max_items ) { $ page_nums = range ( 1 , $ this -> pages ( ) ) ; } else { $ lower_limit = max ( $ this -> get - $ range , 1 ) ; $ upper_limit = min ( $ this -> pages ( ) , $ this -> get + $ range ) ; $ page_nums = range ( $ lower_limit , $ upper_limit ) ; } if ( $ reversed ) { $ page_nums = array_reverse ( $ page_nums ) ; } foreach ( $ page_nums as $ i ) { if ( $ this -> get == $ i ) { $ r .= str_replace ( '{nr}' , $ i , $ current ) ; } else { $ r .= str_replace ( '{nr}' , $ i , $ link ) ; } } return $ r ; }
This shows an loop of 'numbers' with their appropriate link in custom html
@param string $link The HTML to display a number with a link
@param string $current The HTML to display a the current page number without a link
@param string $reversed Optional Parameter, set to true if you want the numbers reversed (align to right for designs)
@return string The Same HTML replaced the tags with the proper numbers and links
This shows an loop of numbers with their appropriate link in custom html