How to go about getting a new iPhone if my contract isn't up?

I have a few problems with my iPhone 4 and I would like to get a new one. The problem is I have no warranty and I'm not due for an upgrade for a long time. I don't want to pay a lot so I was thinking about buying one off ebay. But how would I activate that if I did? Can I just buy a new one and put my sim card in it? Basically I'm looking for a new phone without spending a lot of money.

You can't purchase an new iPhone for contract price without serving the full 2-year contract. You'll have to wait!

If you're having problems with your iPhone, take it to Apple and get a replacement!