Antidiarrhoeal
An anti-diarrhoeal drug (or anti-diarrheal drug in American English) is any medication which provides symptomatic relief for diarrhoea.

Types
 Electrolyte solutions, while not true antidiarrhoeals, are used to replace lost fluids and salts in acute cases.
 Bulking agents like methylcellulose, guar gum or plant fibre (bran, sterculia, isabgol, etc.) are used for diarrhoea in functional bowel disease and to control ileostomy output.
 Absorbents absorb toxic substances that cause infective diarrhoea, methylcellulose is an absorbent.
 Anti-inflammatory compounds such as bismuth subsalicylate.
 Anticholinergics reduce intestinal movement and are effective against both diarrhoea and accompanying cramping. 
 Opioids' classical use besides pain relief is as an anti-diarrhoeal drug. Opioids have agonist actions on the intestinal opioid receptors, which when activated cause constipation. Drugs such as morphine or codeine can be used to relieve diarrhoea this way. A notable opioid for the purpose of relief of diarrhoea is loperamide which is only an agonist of the μ opioid receptors in the large intestine and does not have opioid affects in the central nervous system as it doesn't cross the blood–brain barrier in significant amounts. This enables loperamide to be used to the same benefit as other opioid drugs but without the CNS side effects or potential for abuse.
Octreotide (somatostatin analogue) may be used in hospitalized patients to treat secretory diarrhea.

See also
 ATC code A07 Antidiarrheals, intestinal anti-inflammatory/anti-infective agents

References