reduce_double_slashes()

reduce_double_slashes($str)

Parameters:
  • $str (string) – Input string
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:

1
2
echo reduce_double_slashes($string); // results in "http://example.com/index.php"
doc_CodeIgniter
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.