I would write it like this:
PHP Code:
echo '<div id="thumbnail" style="background: url("images/portfolio/'.$row['thumbnail'].'"); width: 240px; height: 160px;\">title</div> ';
It's by the way better practice to use echo instead of print as echo is
slightly faster than print and there are therefore no reason to use print. Well if you don't need the return value of print in an expression for example.
EDIT: oops, didn't see you were quicker than me TFlan