If you unlock the iPhone, you can use the sim card from the pay as you go phone.
You have to get the pay as you go plan with anyphone (the cheapest one) and remove the sim card. If you don't know what I mean, google "remove at&t simcard".
You need to unlock the iPhone now. Google "unlock...