Let $L$ be a Lie-algebra. I have to show that the Lie-bracket $[\,,]$ is associative if and only if $[x,y]\in C(L)$ for all $x,y\in L$, where $C(L)$ denotes the center of $L$.
I know that $[x,y]\in C(L)\Leftrightarrow [[x,y],z]=0\,\,\,\forall z\in L$. But from here I do not know how to continue.
Can anyone give me hint?