This topic looks kinda familiar…
Assuming you have sound separate from the SCART cable, ExtremeYoshiFan’s advice is mostly sound, but I have a couple of things to add to it:
If you’re going to buy an adapter cable, I’d recommend something that has all female connectors to begin with kinda like this instead of using a gender changing coupler. That way your cable setup doesn’t get too complicated and you have fewer connection points to degrade the signal.
On one side you plug in your headphones and the red/white cables from your console into the corresponding ends on the other. (Red to red, white to… black? A bit nonstandard but meh.)
If you don’t have sound separate from SCART, this won’t work tough.
In that case you may want to consider a budget surround sound system with an a/v receiver or some sort of external sound card. Then you could just plug the Digital Optical or HDMI cables from your PS3 and T.V. into the receiver and have direct access to a 1/4" headphone jack (they make 1/8"-1/4" adapters, your headphones may’ve even come with one) when you need it.
Granted, finding room for a surround sound system isn’t exactly easy…