There are many reasons that a dog will stop eating well. Most of the time it is not that he stopped liking the food even though new food might get him eating for a short time. Spoiled food can affect appetite, but usually, poor appetite has a medical cause.
Possible causes include gum and tooth disease, mouth lesions (ulcers, tumors), nausea caused by stomach ulcers (does he get any medications including for pain), systemic infection, kidney and/or liver disease, bladder infections (cystitis), pain from any cause, tumors/cancer, gastrointestinal disease, emotional stress (boarding, owner away/sick, other companion animals sick or away). Some of these commonly have additional signs such as diarrhea and/or vomiting.
The above list is not all inclusive, but does indicate the wide range of problems that can cause anorexia. Not eating is a sign of a problem rather than the actual problem. Diagnosis of the specific cause is important. If a dog fails to eat for more than a couple days, a veterinary exam is in order. This includes a history of recent events in the dog's life, a physical exam and diagnostic testing as indicated. A fecal analysis (take a fresh sample with you), urinalysis, complete blood count and blood chemistry are usually part of an inclusive medical exam.
Let me know if you have follow up questions.