How can one define a function like "array_stripslashes" in PHP?

When working with data from forms or databases in PHP, it is common to encounter slashes added to strings, which can cause issues when displaying or processing the data. To remove these slashes, you can define a function like "array_stripslashes" that recursively applies the stripslashes function to an array.

function array_stripslashes($arr) {
    foreach ($arr as $key => $value) {
        if (is_array($value)) {
            $arr[$key] = array_stripslashes($value);
        } else {
            $arr[$key] = stripslashes($value);
        }
    }
    return $arr;
}
```

You can then use this function to remove slashes from an array like this:

```php
$clean_data = array_stripslashes($_POST);