Apple usb charger won't work?

I've had my iphone for a bit, it came with a charger, it's been working fine, and it's in great condition, now it randomly won't charge in an outlet? Is there a fix to this

How long have you had it?
This happened to me after about a year and a half. Make sure you check that the USB is secured. Or maybe it's the outlet.