first of all, your HTML in body.tpl is a little messed up. your body.tpl should look something like this:
<table border="0" width="100%" cellpadding="0" cellspacing="1" bgcolor="#333333" id="table5" height="132">
<tr><td bgcolor="#F1F1F1">News Html</td></tr>
<!-- BEGIN newstorepeat -->
<tr><td bgcolor="#FFFFFF">{TITLE} - Posted by {POSTER} on {TIMESTAMP}</td></tr>
<tr><td bgcolor="#FFFFFF">{ARTICLE}</td></tr>
<!-- END newstorepeat -->
<tr><td bgcolor="#FFFFFF"><p align="right">Other</td></tr>
</table>
then you could so something like this (i'm just guessing at your exact data structure):
$contents = file_get_contents('body.tpl');
$explode_begin = explode('<!-- BEGIN newstorepeat -->', $contents);
$explode_footer = explode('<!-- END newstorepeat -->', $explode_begin[1]);
$header = $explode_begin[0];
$middle = $explode_footer[0];
$footer = $explode_footer[1];
// assume already connected to db
$result = mysql_query('SELECT * FROM news');
echo $header;
while ($row = mysql_fetch_assoc($result))
{
$middle = str_replace('{TITLE}', $row['title'], $middle);
$middle = str_replace('{POSTER}', $row['poster'], $middle);
$middle = str_replace('{TIMESTAMP}', $row['timestamp'], $middle);
$middle = str_replace('{ARTICLE}', $row['article'], $middle);
echo $middle;
}
echo $footer;