My iPhone 4 will not charge?

I have had this problem for a while now. But whenever I restarted my phone with the charger in it started to work. I have cleaned all metal prongs in the USB and the part that plugs into the iPhone, this has not fixed it. The phone is not jail broken I'm just wondering if there's any easy way to fix it.

IPhones usually have problems, take it to an Apple store.