trim_slashes($str)
Parameters: |
|
---|---|
Returns: |
Slash-trimmed string |
Return type: |
string |
Removes any leading/trailing slashes from a string. Example:
$string = "/this/that/theother/"; echo trim_slashes($string); // results in this/that/theother
Note
This function is DEPRECATED. Use the native trim()
instead: | | trim($str, ‘/’);
Please login to continue.