What is the purpose of the rawurldecode function in the PHP code provided?

The rawurldecode function in PHP is used to decode URL-encoded characters in a string. This function is useful when dealing with URLs or form data that has been encoded using urlencode or rawurlencode. By using rawurldecode, you can ensure that special characters in the URL are properly decoded and displayed correctly.

// Example PHP code snippet using rawurldecode function
$url = "https%3A%2F%2Fwww.example.com%2Fpage%3Fid%3D123";
$decoded_url = rawurldecode($url);
echo $decoded_url;