Is there an an iphone application for spelling and grammar?

I'm looking for an iphone application that if I type in text messages that it can grammar check them prior to sending then and spelling as well.

I know that spell check exists on iphone. But when I was texting a girl I kept using the wrong Their and there and than and then. And was wondering if there's a way on a phone to correct that mistake prior to sending.

Sadly, iPhone applications can't correct grammar. It would make life a little easier, but there's not such thing yet. Sorry to tell you. You might just want to read over a message before you send it while keeping these tips in mind,

their: possessive, shows ownership. If Bob and Kate have a cat, it is "their's"
there: shows a place or location. If I dropped a ball, I would say, it's over "there"
they're: contraction of "they are". "They're" my cupcakes.

then: a word to mark time. Take out the cake and let it cool. "Then" frost with chocolate icing.
than: than is used to make comparisons between words. Organic food is better "than" regular food.