It can be difficult to treat a cough in a three year old, since over the counter medications are often not effective and some of them can be dangerous.
If your child has a high fever
, difficulty breathing, rapid breathing
or is having trouble catching his breath then he needs to be evaluated by his doctor.
If the cough is not keeping your child awake at night, then I would recommend only lots of fluids, a humidifier to keep their throat moist and keep the mucus moist so that they can expectorate it, and sleeping with their head propped up a bit to help keep the mucus from pooling in the throat.
A teaspoon of honey has been studied as a treatment for cough in children, and has been shown to work as well as over the counter cough syrup. It's soothing to the throat and can help a great deal.
If those things do not work, and your child has a cough that wakes them at night, you can try some over the counter cough syrup that has Dextromethorpham in it - I would avoid combination medicines with decongestants, fever
reducers or other medicines. In the US, you can find this as Delsym cough syrup. I would use just 1/2 of the normal dose to start with - this will usually calm the cough down enough that you child will be able to sleep. Some will also recommend Benadryl, but this mostly sedates the child so that they can sleep and does not directly help the cough.
I hope this was helpful.