They both (D3100 and T3i) are good as entry level DSLRs.
I must agree with Martin anyway. You might also want to consider K-30. As a Pentax user I can write here some of the cons instead of pros of the K-30 (the pros for me can be a long list
).
* it has less lenses available if you don't like to shoot in manual focus and manual mode.
* X sync is slower (1/180 max)
* color depth is less compared to other two.
* if you'd like to shoot videos, contrast detection AF can be painful especially in low light.
* price is higher.
Cheers,