Gamma-ray emission from millisecond pulsars in globular clusters