i seen so many tutorials but it didn’t work .i am trying this thing from last 3 days, in the end i need you guys help me.i am beginner in php so please explain step by step .
hundred thanx in advanced….
here is my css code:
div.pagination
{
width:625px;
clear:both;
padding:10px 0 10px 0;
margin:0px;
text-align:center;
float:left;
clear:both;
font-size:11px;
}
div.pagination a
{
padding: 2px 5px 2px 5px;
margin-right: 2px;
border: 1px solid #52bfea;
text-decoration: none;
color: #52bfea;
}
div.pagination a.current
{
padding: 2px 5px 2px 5px;
margin-right: 2px;
border: 1px solid #52bfea;
font-weight: bold;
background-color: #52bfea;
color: #FFF;
}
div.pagination a:hover, div.pagination a:active
{
border:1px solid #52bfea;
color: #fff;
background-color: #52bfea;
}
here is my php code:
<div class="pagination">
<?php
if($pagination->total_pages() > 1)
{
?>
<?php
if($pagination->has_previous_page())
{
?>
<a href="index.php?page=<?php echo $pagination->previous_page();?>"><< prev</a>
<?php
}
?>
<?php
for($i=1; $i <= $pagination->total_pages(); $i++)
{
$class = ($i==isset($_GET['page']))? 'current' : '';
?>
<a class='<?php echo $class?>' href="test.php?page=<?php echo $i; ?>"><?php echo $i?></a>
<?php
}
?>
<?php
if($pagination->has_next_page())
{
?>
<a href="index.php?page=<?php echo $pagination->next_page();?>"> next >></a>
<?php
}
?>
<?php
}
?>
</div>
</div>
Replace this
with