i have this :
searchcat_page.php?subcat=EXOTIC&pages=2&page=2&pages=4&page=3
and in my code i have this
if (isset($SERVER['QUERY_STRING'])) { $passpage=$SERVER['QUERY_STRING']."&"; } else { $passpage=''; }
how im going to parse it and the output should only
searchcat_page.php?subcat=EXOTIC when i click on my NEXT >>
using preg_match and preg_replace or str_replace