previous_url()
function previous_url(): string
Description
Retrieves the URL of the previous page, if available.
Return Value
| Type | Description |
|---|---|
| string | Returns the URL of the previous page as a string. |
Example Usage
PHP
echo previous_url();
// Output: URL of the previous page if available, otherwise an empty string.