Pommo_Helper::slashStrip PHP Method

slashStrip() public method

deeply strips slashes added by magic quotes. Generally used on $_POST & $_GET.
public slashStrip ( $input )
    function slashStrip($input)
    {
        if (is_array($input)) {
            foreach ($input as $key => $value) {
                $input[$key] = Pommo_Helper::slashStrip($value);
            }
            return $input;
        } else {
            return stripslashes($input);
        }
    }

Usage Example

Ejemplo n.º 1
0
 function slashStrip($input)
 {
     if (is_array($input)) {
         foreach ($input as $key => $value) {
             $input[$key] = Pommo_Helper::slashStrip($value);
         }
         return $input;
     } else {
         return stripslashes($input);
     }
 }