prune juice is the best, you can get in spinneys. or a husk called"isabgol" found in Al adil. just mix 1 tbsp in warm milk. let it stand for 1-2 min. add sugar if required. this is ayurvedic. i mostly take this only. if you have diarrhoea you can take this in yoghurt and if constipation then in warm milk. Hope your LO feels better.
all the stuff said below, any stone fruits are good. If fruit is dried give with plenty of water or soak overnight and give as a puree with the soaking water. The other thing too is to cut back/cut out the constipating foods, like apples, pasta, rice, bread, potato, cheese etc. (for my son, bread, cheese and yoghurt especially). Blueberries and avocado seem to get him going.
If its been an ongoing problem and they have a sore bottom, they can "with-hold" as in holding in the poo and may need stool softeners for a few weeks to break the fear.
I've found with my 2 year old he needs a little quiet time in the morning and evening just after his meal for around 20 min) so that he doesn't get distracted. He won't poo if we are out and about, so I leave him alone with his toys or in front of TV and let him get around to his business :)
I like to give the child some immediate relief first - so I give a pediatric glycerine suppository, which should produce a result within 5 - 30 min. Make sure you lubricate it with something like KY jelly or Vaseline etc.
Then, I would start with increased fibre, increased water intake, diluted fruit juice, fruit - prunes, pears, peaches & plums., or any that they will eat. Dried fruit also works well. Make sure the child is getting some daily exercise.
Check out Dr Sears advice -
http://www.askdrsears.com/topics/childhood-illnesses/constipation