TITLE: Principal ideal property without being integral domain?
QUESTION [6 upvotes]: In my algebra course (taught from Artin), a principal ideal domain is defined as an integral domain such that all ideals are principal. This got me wondering: 

Are there rings for which every ideal is principal, but the ring is not an integral domain?

REPLY [8 votes]: Definitely! In fact there's a Wikipedia page about principal ideal rings.
The smallest example that is not a domain would be $\mathbb{Z}/4\mathbb{Z}$. More generally, you can take any principal ideal domain $R$ you know, and any ideal $I\subset R$ that is not a prime ideal, and then $R/I$ will be a principal ideal ring that is not a domain.