Hey,
I have a pagination script and this is part of the script:
<div style="width:516px; height:30px; text-align:center">
<?php
// add buttons
$i = 1;
while ($i <= $gal) {
?>
<div class="button_colour">
<a href="gallery.php?search=<? echo $player_name; ?>&i=<? echo $i; ?>"><? echo $i; ?></a>
</div>
<?php
$i++;
}
?>
</div>
But say I created a class called button_current how could I add that to my code, so when you are on that page it's a different colour to the other buttons? I thought of adding a
if($i == $page){
} else {
But can't seem to get it right, can anyone help?
Thanks