$url = 'https://example.com/newpage.php'; gotolink($url);
$id = 123; $url = "https://example.com/page.php?id=$id"; gotolink($url);In this example, the $id variable is used to construct a URL that includes the ID parameter. The user will be redirected to a page that shows information for the ID 123. This function is a part of the PHP Standard Library and does not require any external package.