The pharynx is a tube-like structure that connects the nasal and oral cavities to the larynx. Its function is to provide a passageway for the respiratory and digestive tracts. … It has to coordinate both inspiration and swallowing while eating, or else aspiration and death may result. 29 people found this useful.