PHP Change obtient de la valeur dans un lien
preg_replace("#&d=.*&#", '&d=newvalue&', $_SERVER['REQUEST_URI'])
Obnoxious Otter
preg_replace("#&d=.*&#", '&d=newvalue&', $_SERVER['REQUEST_URI'])
$query = $_GET;
// replace parameter(s)
$query['d'] = 'new_value';
// rebuild url
$query_result = http_build_query($query);
// new link
<a href="<?php echo $_SERVER['PHP_SELF']; ?>?<?php echo $query_result; ?>">Link</a>