reduce_double_slashes($str)
| Parameters: |
|
|---|---|
| Returns: |
A string with normalized slashes |
| Return type: |
string |
Converts double slashes in a string to a single slash, except those found in URL protocol prefixes (e.g. http://).
Example:
$string = "http://example.com//index.php"; echo reduce_double_slashes($string); // results in "http://example.com/index.php"
Please login to continue.