Apart from that, thanks to a friend i got it working (via a different way though).
$result2 = mysql_query("SELECT * FROM berichten ORDER BY id DESC")
or die(mysql_error());
$totaalrecords = mysql_num_rows($result2);
$ITEMS_PER_PAGE = "3";
$start = (isset($_GET['start']) && is_numeric($_GET['start'])) ? $_GET['start'] : 0;
if ( $start+$ITEMS_PER_PAGE<$totaalrecords ) {
echo "<a href=\"index.php?start=$link\">next 3 »</a>";
}
$nummer = "1";
for ( $counter = 0; $counter <= $totaalrecords; $counter += $ITEMS_PER_PAGE ) {
echo "<a href=\"index.php?start=$counter\">pagina $nummer</a> ";
$nummer = $nummer +1;
} This outputs (i have 7 records at the moment)
index.php?start=0
next 3 »
page 1 page 2 page 3
index.php?start=3
next 3 »
page 1 page 2 page 3
index.php?start=6
page 1 page 2 page 3
So that's fine. Only thing i want is, instead of page 1 till 1500 (in the far future), something like this;
1 - 2 - 3 ... 120 - 121 - 122
When you are on page 15, it will show 12 - 13 - 14 ... 120 - 121 - 122.
Can anyone help me with that?
Thanks!