Let $A$ be a Noetherian ring and $\mathfrak{p} \in Spec(A).$ If $x \in \mathfrak{p}$ then it is well-known that $ht_{A/(x)}(\mathfrak{p}/(x)) \leq ht_A(\mathfrak{p}) \leq ht_{A/(x)}(\mathfrak{p}/(x))+1$ where $ht$ stands for height.

Moreover, if $x$ is not a zero-divisor, then $ht_A(\mathfrak{p})= ht_{A/(x)}(\mathfrak{p}/(x))+1.$

Does the converse hold? that is, if the equality holds, is it possible to deduce that $x$ is not a zero-divisor.