Answer :

There are basically 3 types of pharynx- nasopharynx, oropharynx and laryngopharynx.
The function of the pharynx are:-
1. To transport the food from mouth to esophagus. 
2. To warm, moisten and filter the air, before it moves to the trachea, and then to the bronchi, the bronchioles, the alveoli and at last to the lungs.
    Therefore, pharynx(or throat) is a part of both- digestive and respiratory systems.
3. It is also important for vocalization. 



The pharynx acts as a passageway for food on its way to the stomach and for air en route to the lungs.
The pharynx is the part of the alimentary canal immediately behind the mouth.PharynxThe pharynx, or throat, is the passageway leading from the mouth and nose to the esophagus and larynx. The pharynx permits the passage of swallowed solids and liquids into the esophagus, or gullet, and conducts air to and from the trachea, or windpipe, during respiration. The pharynx also connects on either side with the cavity of the middle ear by way of the Eustachian tube and provides for equalization of air pressure on the eardrum membrane, which separates the cavity of the middle ear from the external ear canal. The pharynx has roughly the form of a flattened funnel. It is attached to the surrounding structures but is loose enough to permit gliding of the pharyngeal wall against them in the movements of swallowing. The principal muscles of the pharynx, involved in the mechanics of swallowing, are the three pharyngeal constrictors, which overlap each other slightly and form the primary musculature of the side and rear pharyngeal walls.