I have to prove that if $P$ is a $R$-module , $P$ is projective $\Leftrightarrow$ there is a family $\{x_i\}$ in $P$ and morphisms $f_i\colon P\to R$ such that for all $x\in P$ $$ x= \sum_{i\in I} f_i(x)x_i$$ where for each $x\in P$, $f_i(x)=0$ for almost all $i\in I$.
Any help?