The existence of infinitely many subharmonic solutions is proved for the periodically forced nonlinear scalar equation $u'' + g(u) = e(t)$, where g is a continuous function that is defined on a open proper interval $(A,B) \subset \mathbb{R}$. The nonlinear restoring field g is supposed to have some singular behaviour at the boundary of its domain. The following two main possibilities are analyzed: (a) The domain is unbounded and g is sublinear at infinity. In this case, via critical point theory, it is possible to prove the existence of a sequence of subharmonics whose amplitudes and minimal periods tend to infinity. (b) The domain is bounded and the periodic forcing term $e(t)$ has minimal period $T > 0$. In this case, using the generalized Poincaré–Birkhoff fixed point theorem, it is possible to show that for any $m \in \mathbb{N}$, there are infinitely many periodic solutions having $mT$ as minimal period. Applications are given to the dynamics of a charged particle moving on a line over which one has placed some electric charges of the same sign.