What is the function in PHP that can be used to remove slashes from a string?

When working with strings in PHP, sometimes the input may contain unnecessary slashes, especially if the data has been passed through a form or a database. To remove these slashes from a string, you can use the `stripslashes()` function in PHP. This function removes backslashes that are added to escape characters like quotes, making the string cleaner and more readable.

// Example of using stripslashes() function to remove slashes from a string
$input = "This is a string with \'slashes\'";
$cleaned_string = stripslashes($input);

echo $cleaned_string; // Output: This is a string with 'slashes'