Put the output of grep in a variable

Hi,
in a shell script how can I put the result of a grep command in a variable :
myvariable=grep mystring myfilename

Thank you.

myvariable=$(grep mystring myfilename)

Hmmm...

I would have said:

myvariable=`grep mystring myfilename`

Thanks to all.