[SOLVED]How can I control the brightness of an LED with a potentiometer?

Hi,

I am new to Arduino, and am wondering how can I control the brightness of an LED with a potentiometer? Can someone tell me the code to do this?

Thank you

Search this site?

I think there's a tutorial on that in the Learnng section, browse there & then come back to this thread.

Thank you for your answers. The link Nick provided was what I needed. Thank you again.