What version of PS do you have? In CS5 Extended, you’d do this with the Repoussé tool and simply extrude the text, using a scaling effect along with a short lens to get the appearance of depth.
I haven’t done this in AI in long enough that I couldn’t tell you right off the bat.