title: highlight current page in pagination?
body: <p>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....</p>
  
  <p>here is my css code:</p>
  
  <pre><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;
  }
  </code></pre>
  
  <p>here is my php code:</p>
  
  <pre><code>&lt;div class="pagination"&gt;
  &lt;?php
  if($pagination-&gt;total_pages() &gt; 1)
  {
  ?&gt;  
  &lt;?php
  if($pagination-&gt;has_previous_page())
  {
  ?&gt;
  &lt;a href="index.php?page=&lt;?php echo $pagination-&gt;previous_page();?&gt;"&gt;&lt;&lt; prev&lt;/a&gt;
  &lt;?php
  }
  ?&gt;
  &lt;?php
  for($i=1; $i &lt;= $pagination-&gt;total_pages(); $i++)
  { 
  $class = ($i==isset($_GET['page']))? 'current' : '';
  ?&gt;
   &lt;a class='&lt;?php echo $class?&gt;' href="test.php?page=&lt;?php echo $i; ?&gt;"&gt;&lt;?php echo $i?&gt;&lt;/a&gt; 
  &lt;?php
   }
  ?&gt;
  &lt;?php
   if($pagination-&gt;has_next_page())
   {
   ?&gt;
   &lt;a href="index.php?page=&lt;?php echo $pagination-&gt;next_page();?&gt;"&gt; next &gt;&gt;&lt;/a&gt;
   &lt;?php
   }
   ?&gt;
   &lt;?php
   }
   ?&gt; 
   &lt;/div&gt; 
    &lt;/div&gt;
  </code></pre>