In this article, we have characterized ideals in $C(X)$ in which every ideal is also an ideal (a $z$-ideal) of $C(X)$. Motivated by this characterization, we observe that $C_infty(X)$ is a regular ring if and only if every open locally compact $sigma$-compact subset of $X$ is finite. Concerning prime ideals, it is shown that the sum of every two prime (semiprime) ideals of e...