Source Code:
(back to article)
<?php $base_url = "http://www.example.com"; $query_params = ["param1" => "value1", "param2" => "value2"]; $anchor = "section1"; $url = $base_url . "?" . http_build_query($query_params) . "#" . $anchor; echo $url;
Result:
Report an issue