Phprad input mask

How do you create a custom input mask? I want to create a make for north american telephone numbers: ###-###-####?