Solutions of rehydration like Electral or Enerzal or any other oral rehydration drinks can be liberally taken during diarrhea. When you have diarrhea you are losing electrolyte balance quickly due to repeated loss of water and ions. In severe cases solutions are injected intravenously if the patient becomes unstable due to loss of electrolyte. It is better to starve during diarrhea than to eat anything.
You may not have appetite once the diarrhea sets in. It might disturb your stomach causing flatulence and stomach cramps. In that case, you can stick on to drinks of electrolyte. If you feel hungry, you can eat brat diet like rice, bananas, apple and toast. Yoghurt can be useful in arresting diarrhea. Probiotics that contain Saccaromyces and Lactobacillus casei can help in growth of good bacteria that help in normal bowel movement.