for($i = 1; $i <= $this->total_pages; $i++) { #loop to print << 1 2 3... $total_pages >> if($i == 1 && $this->page > 1) #Prints the << first to goto the previous page (not on page 1) echo "<a href=/"$PHP_SELF?page=".($this->page - 1)."/" onMouseOver=/"status="Previous Page";return true;/" onMouseOut=/"status=" ";return true;/">?</a>";
if($i == $this->page) #Doesn"t print a link itself, just prints page number echo "<font color=/"#ff3333/"> $i </font>";
if($i != $this->page) #Other links that aren"t this page go here echo "<a href=/"$PHP_SELF?page=$i/" onMouseOver=/"status="Go to Page $i";return true;/" onMouseOut=/"status=" ";return true;/"> $i </a>";
if($i == $this->total_pages && $this->page != $this->total_pages) # Link for next page >> (not on last page) echo "<a href=/"$PHP_SELF?page=".($this->page + 1)."/" onMouseOver=/"status="Go to the Next Page";return true;/" onMouseOut=/"status=" ";return true;/">?</a>"; }