The present invention relates to a topical composition (and methods of producing the such compositions) for the treatment of a fungal infection comprising a polymer capable of forming nanoparticles and an antifungal agent. The invention also relates to novel uses of polyhexamethylene biguanide.