  Although SrNi$_2$P$_2$ adopts the common ThCr$_2$Si$_2$ structure for $T\geq
325$ K, being in an uncollapsed tetragonal (ucT) state, on cooling below 325 K
it adopts a one-third collapsed orthorhombic (tcO) phase where one out of every
three P-rows bond across the Sr layers. On the other hand, SrCo$_2$P$_2$ only
exhibits the uncollapsed ThCr$_2$Si$_2$ structure from room temperature down to
1.8 K. Neither SrNi$_2$P$_2$ nor SrCo$_2$P$_2$ manifest magnetic transitions
down to 50 mK and 2 K, respectively. In this work we report the effects of Co
substitution in Sr(Ni$_{1-x}$Co$_x$)$_2$P$_2$, which allows for tuning the
transition between the one-third collapsed and the uncollapsed structure. We
find a rapid decrease of the one-third collapsed structural transition
temperature with increasing Co fraction, until reaching full suppression for $x
\geq 0.1$. Substitution levels in the range $0.11\leq x\leq 0.58$ show no signs
of any transition down to 1.8 K in the magnetization or resistance measurements
in the range $1.8\ \text{K}\leq T\leq 300\ \text{K}$. However, different
magnetically ordered states emerge for $x\geq 0.65$, and disappear for $x\geq
0.99$, recovering the known paramagnetic properties of the parent compound
SrCo$_2$P$_2$. These results are summarized in a phase diagram, built upon the
characterization done on single crystals with different Co fraction. Both the
magnetic and structural properties are compared to other systems with
ThCr$_2$Si$_2$ structure that exhibit magnetic ordering and collapsed
tetragonal transitions. The magnetic ordering and moment formation are well
described by Takahashi's spin fluctuation theory of itinerant electron
magnetism.
