All the magic of the template class is between <!-- BEGIN mysampleblock --> and <!-- END mysampleblock -->.
Text Formatted Code
<table id="sample" class="tablesorter">
<thead>
<tr>
<th>{lang_sample_id}</th>
<th>{lang_sample_desc}</th>
</tr>
</thead>
<tbody>
<!-- BEGIN mysampleblock -->
<tr>
<td>{sample_id}</td>
<td>{sample_desc}</td>
</tr>
<!-- END mysampleblock -->
</tbody>
</table>
Text Formatted Code
$T = new Template($_CONF['path'] . 'plugins/myplugin/templates');
$T->set_file ('mysample','sample.thtml');
$T->set_block('admin', 'mysampleblock','mysamplevariable');
for ( $i=0; $i < $nRows; $i++ ) {
$row = DB_fetchArray($result);
$T->set_var(array(
'sample_id' => $row['sample_id'],
'sample_desc' => $row['sample_desc']
));
$T->parse('mysamplevariable','mysampleblock',true);
}