Carl wrote:
you might as well upgrade to a newer phone if you have an older version.
What terrible advice.
If you have an iPhone 5 I can all but guarantee the Apple store will replace it for free if you're nice enough to them. Worst case Ontario you pay like $100 or whatever it is. But you won't have to - I've had an iPhone 4 and 5 replaced au gratis by those fine people.
If you have a newer model then same thing applies - you might get lucky, but you can otherwise have it repaired for a nominal fee. It'll cost about the same as anywhere else you take it - but if you go to through Apple it'll probably be a totally new refurbished one instead.
Just don't go to the place in the mall. Wife took the iPad there and they did a pretty terrible job at the replacement.