public static function escapeFunction($parameter)
    {
        $result = $parameter;

        switch (true) {
            case is_string($result) :
                $result = "'" . addslashes($result) . "'";
                break;

            case is_array($result) :
                foreach ($result as &$value) {
                    $value = static::escapeFunction($value);
                }

                $result = implode(', ', $result);
                break;

            case is_object($result) :
                $result = addslashes((string) $result);
                break;
        }

        return $result;
    }
public static function escapeFunction($parameter)
    {
        $result = $parameter;

        switch (true) {
            case is_string($result) :
                $result = "'" . addslashes($result) . "'";
                break;

            case is_array($result) :
                foreach ($result as &$value) {
                    $value = static::escapeFunction($value);
                }

                $result = implode(', ', $result);
                break;

            case is_object($result) :
                $result = addslashes((string) $result);
                break;
        }

        return $result;
    }
public static function escapeFunction ( $ parameter ) { $ result = $ parameter ; switch ( true ) { case is_string ( $ result ) : $ result = "'" . addslashes ( $ result ) . "'" ; break ; case is_array ( $ result ) : foreach ( $ result as & $ value ) { $ value = static :: escapeFunction ( $ value ) ; } $ result = implode ( ', ' , $ result ) ; break ; case is_object ( $ result ) : $ result = addslashes ( ( string ) $ result ) ; break ; } return $ result ; }
Escape parameters of a SQL query
DON'T USE THIS FUNCTION OUTSIDE ITS INTEDED SCOPE

@internal

@param mixed $parameter

@return string
Escape parameters of a SQL query DON T USE THIS FUNCTION OUTSIDE ITS INTEDED SCOPE