Radio Buttons Controlling Textfields

In a form, how do I have a set of radio buttons with the last one being an other option that shows and hides a textfield depending on if it is selected or not? I have seen how to disable the textfield if the radio button is not selected, but not how to hide it. Is this possible?

It is with Javascript. You should take this question there, as PHP does not actively run on a page.