The Duke of Edinburgh has been taken to hospital as a "precautionary measure" for treatment of an infection.