If you are taking antibiotics, there's no harm in eating yogurt to try to prevent diarrhea. But check with your health care provider or pharmacist first, since the calcium in dairy foods can interfere with the absorption of certain antibiotics. If you want to try a probiotic supplement, ask your doctor if it is safe for you and what product and dose you should take. Keep in mind that not all probiotic strains have been tested for reducing antibiotic-associated diarrhea. Most studies in a 2012 JAMA analysis used Lactobacillus-based products alone or in combination with other organisms.