strip_slashes()

strip_slashes($data)

Parameters:
  • $data (mixed) – Input string or an array of strings
Returns:

String(s) with stripped slashes

Return type:

mixed

Removes any slashes from an array of strings.

Example:

$str = array(
        'question'  => 'Is your name O\'reilly?',
        'answer' => 'No, my name is O\'connor.'
);

$str = strip_slashes($str);

The above will return the following array:

array(
        'question'  => "Is your name O'reilly?",
        'answer' => "No, my name is O'connor."
);

Note

For historical reasons, this function will also accept and handle string inputs. This however makes it just an alias for stripslashes().

doc_CodeIgniter
2016-10-15 16:32:41
Comments
Leave a Comment

Please login to continue.