Dietary fibers help regulate the bowel movement. Therefore, the consumption of high-fiber diet including whole grains, fruits, and vegetables like spinach, carrot, etc., can help treat diarrhea and constipation. The amount of fiber intake should be increased gradually so as to prevent bloating and/or gas formation. One can take fiber supplements, if he/she has problems in digesting the dietary fiber.