Let $R$ be a commutative ring with identity. Assume that for any two principal ideals $Ra$ and $Rb$ we have either $Ra\subseteq Rb$ or $Rb\subseteq Ra$. Show that for any two ideals $I$ and $J$ in $R$, we have either $I\subseteq J$ or $J\subseteq I$.
Initially i thought that if i could show that any ideal in the ring is principal then i am done. But could not show what i thought of. Is my assumption to solve the problem correct? How can i proceed? Any hints would be highly appreciated. Thank you.