PHP rawurldecode()

rawurldecode - Decode URL encoded string

Function

string rawurldecode ( string $str )

Parameters

$str - The URL to be decoded.

Return value

Returns the decoded URL as a string in which the sequences with percent (%) signs followed by two hex digits have been replaced with literal characters.

Example

<?php
$str = 'raw%20url%20decode';
echo "http://example.com/?param=" . rawurldecode( $str );
?>

Output

http://example.com/?param=raw url encode

Github

github.com/urldecoder/examples/blob/main/rawurldecode.php

See also: