php if videos- current videos- total_pages echo href page videos- curr

1
2
3
4
5
6
7
<?php
if($videos->current + 2 < $videos->total_pages) echo '<a href="?page='.($videos->current + 2).'">'.($videos->current + 2).'</a>';
if($videos->current + 1 <= $videos->total_pages) echo '<a href="?page='.($videos->current + 1).'">'.($videos->current + 1).'</a>';
if($videos->current) echo '<span>'.($videos->current).'</span>';
if($videos->current - 1 > 0) echo '<a href="?page='.($videos->current - 1).'">'.($videos->current - 1).'</a>';
if($videos->current - 2 > 0) echo '<a href="?page='.($videos->current - 2).'">'.($videos->current - 2).'</a>';
?>