The food that should be consumed when having diarrhea should be bland and low in fiber content. The most recommended diet for individuals with diarrhea is BRAT diet. This diet literally means banana, rice, apple and toast. These are the foods that match a bland and low fiber diet mentioned earlier. For more information, visit http://www.ask.com/wiki/BRAT_diet
When you are suffering from diarrhea you have to make sure that you are drinking as much water as possible to keep you from dehydrating. As for food you need to try eating crackers, toast, rice, or any kind of dry foods.
if you have diarrhea try to eat non irritating and gas forming foods. You can try drinking lots of fluids also to replenish the fluid loss. The best would be banana, other fruits and vegetables, dry crackers and bread.