When the tonsils become inflamed/swollen, tiny particles of food can get trapped inside the small crevices of the tonsils. They begin to smell, and eventually, you cough them up
, or swallow them. If you have chronic throat problems, your tonsils are probably always swollen...realize that this might be a cycle.
Do you suffer from allergies? If so, a daily allergy medication (allegra, claritin, there are lots of others...) may help eliminate the phlegm.