Every element in a ring with finitely many ideals is either a unit or a zero divisor. I came across the above proposition on mathstackexchange
 If every nonzero element of $R$ is either a unit or a zero divisor then $R$ contains only finitely many ideals? 
the link asks a different question but assumes one i ask here. i tried proving the same but i can't.
Some hint would be useful. I know basic ring theory.
In particular i do not know artinian local rings as someone suggested that it follows easily from the theory of artinian rings.

Hint: Given $a\in R$, consider the chain of ideals $a^n R$.
Solution:

 Since $R$ has only finitely many ideals, we have $a^n R = a^m R$ for some $m>n$. Then, $a^n(a^{m-n}r-1)=0$ for some $r\in R$. This implies that $a^n$ is a zero divisor or $a^{m-n}$ is a unit. In turn, this implies that $a$ is a zero divisor or a unit.

Another hint: Given $a\in R$, $a$ not a zero divisor, consider the map $I\mapsto aI$ on the set of ideals of $R$.
Solution:

 The maps is a bijection because it is injective. Hence, $R=aI$ for some ideal $I$, which implies that $a$ is a unit.

