Look for yogurt with live cultures. These "cultures" are friendly bacteria that can go in and line your intestines, providing you with protection from the bad guys. If you've already got diarrhea, yogurt can help produce lactic acid in your intestines, which can kill off the nasty bacteria and get you feeling better, faster.
Live-culture yogurt (kefir) is also the best way to treat diarrhea caused by oral antibiotics. The antibiotics kill beneficial bacteria in the intestines, but live-culture products replenish those bacteria. Better still, use these from the time you begin the medication, and you may avoid the diarrhea altogether.