Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php replace url parameter value

$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>
 
PREVIOUS NEXT
Tagged: #php #replace #url #parameter
ADD COMMENT
Topic
Name
2+5 =