Beispiel #1
0
function unescapestring__recursive($var)
{
    if (!is_array($var)) {
        return stripslashes($var);
    }
    // Reindex the array without slashes, this time.
    $new_var = array();
    // Strip the slashes from every element.
    foreach ($var as $k => $v) {
        $new_var[stripslashes($k)] = unescapestring__recursive($v);
    }
    return $new_var;
}
function unescapestring__recursive($var)
{
    global $smcFunc;
    if (!is_array($var)) {
        return $smcFunc['db_unescape_string']($var);
    }
    // Reindex the array without slashes, this time.
    $new_var = array();
    // Strip the slashes from every element.
    foreach ($var as $k => $v) {
        $new_var[$smcFunc['db_unescape_string']($k)] = unescapestring__recursive($v);
    }
    return $new_var;
}