URL eski parametreyi kaldırın (PHP)

0 Cevap php

I'm using PHP to create a pagination for a table. I'm using the following code to create the pagination link

<a class='page-numbers' href='$href&pagenum=$i'>$i</a>

$ Href ile

$href = $_SERVER['REQUEST_URI'];

It works well, however, it messes with the address bar, adding each time a new pagenum parameter. So it becomes pagenum=1&pagenum=3&pagenum=4....

Bu nasıl artırılır?

0 Cevap