I am mostly a landscape guy so this may be a stupid question. But, I have seen some portrait photos, especially some wedding shots where the backround is slightly overexposed and the subject shot is perfectly lit. How is this done? Is this done in layers in photoshop or can this be done in camera?

