Can i use straight talk tmobile sim card on my at&t iphone 4?

I bought my friends Iphone4 and I bought the sim card online through straight. I read up on the card and was dumbly mistaken and thought the card was tmolbile compatible but worked with other phone carriers and I had no idea they stopped working on at&t networks. Can I turn my at&t iphone into a tmobile iphone? Or can I magically make the sim card an at&t work sim card? Logic?

I found this website How to use an AT&T iPhone on T-Mobile's no-contract network this website is very helpful and should work check it out…

Only if unlocked.
you can unlock it for $20