<?php
function stripSlashesRecursive($array) {
$stripped = array();
foreach($array as $key => $member) {
if (is_array($member)) {
$stripped[stripslashes($key)] = stripSlashesRecursive($member);
} else {
$stripped[stripslashes($key)] = stripslashes($member);
}
}
return $stripped;
}
$globals = array('\b\ob', array('aw\esome' => 'y\eh'));
$globals = stripSlashesRecursive($globals);
var_dump($globals);