Magnesium citrate is used to treat occasional constipation on a short-term basis. Magnesium citrate is in a class of medications…