Adding A Class To <A> Tag
<p>this code  I used to display paginating links... problem is I need to add some style to the links when its active.. I can style it through some CSS rules.. but at first need to add a class to link tag.. Eg: </p>

<pre><code>    // Make the links to other pages, if necessary.
    if ($pages &gt; 1) {

        echo '&lt;div class="pagination"&gt;';            
            echo '&lt;p&gt;';

            // Determine what page the script is on:
            $current_page = ($start/$display) + 1;

            // If it's not the first page, make a Previous link:
            if ($current_page != 1) {
                echo '&lt;a href="searching.php?s=' . ($start - $display) . '&amp;p=' . $pages . '"&gt;&lt;&lt;/a&gt;';
            }

            // Make all the numbered pages:
            for ($i = 1; $i &lt;= $pages; $i++) {
                if ($i != $current_page) {
                    echo '&lt;a href="searching.php?s=' . (($display * ($i - 1))) . '&amp;p=' . $pages . '"&gt;' . $i . '&lt;/a&gt; ';
                } else {
                    echo '&lt;a class="current" href="#"&gt;' . $i . '&lt;/a&gt; '; // Link to # so that it is not clickable.
                }
            } // End of FOR loop.           

            // If it's not the last page, make a Next button:
            if ($current_page != $pages) {
                echo '&lt;a href="searching.php?s=' . ($start + $display) . '&amp;p=' . $pages . '"&gt;&gt;&lt;/a&gt;';
            }

            echo '&lt;/p&gt;'; // Close the paragraph.

        echo '&lt;/div&gt;';

    } // End of links section.  
</code></pre>

<p>can anybody have any idea how to do this?</p>

<p>thank you..</p>
