I'm not sure I understand your question.
The code snippet you've shown doesn't set any value for $name. Is this correct? has the value been set outside of the snippet?
Or should you be using $row['name'] ? Is it a field returned from the query?
The following line confuses me further:
$output .= "<td><img src=../uploader/news/<?php echo $name; ?>.jpg></td>\n";
Is this line part of your main PHP code (It looks like it)? If so, then you shouldn't have the extra "<?php ... ?>" tags in there.
Assuming that $name is actually populated with something, say a value of "news01", then
$output .= "<td><img src=../uploader/news/$name.jpg></td>\n";
followed by an echo or print of $output will send a command to the browser to download and display the image found at ../uploader/news/news01.jpg on your site.
Does that help clarify at all?
J