public static function clearInput($input)
    {
        if (is_array($input)) {
            foreach ($input as $key => $value) {
                if (!isset($value) || $value === '') {
                    unset($input[$key]);
                }
            }

            return $input;
        }

        return $input;
    }
public static function clearInput($input)
    {
        if (is_array($input)) {
            foreach ($input as $key => $value) {
                if (!isset($value) || $value === '') {
                    unset($input[$key]);
                }
            }

            return $input;
        }

        return $input;
    }
public static function clearInput ( $ input ) { if ( is_array ( $ input ) ) { foreach ( $ input as $ key => $ value ) { if ( ! isset ( $ value ) || $ value === '' ) { unset ( $ input [ $ key ] ) ; } } return $ input ; } return $ input ; }
This will look through the input and remove any unset values.

@param $input

@return mixed
This will look through the input and remove any unset values .