Se non ho capito male vorresti raggruppare i record per na_te (visto che li ordini nella query). Il tuo codice ha parecchi problemi...prova così:
Codice PHP:
$teCurrent = '';
$count = 1;
$size = count($row1);
foreach($row1 as $rows1){
if ($teCurrent != $rows1['na_te']){
if($teCurrent != '') echo ('</div>');
echo ('<h2 class="trigger01"> <div class="Button">
</div></h2><div class="container">');
$teCurrent = $rows1['na_te'];
}
echo '<div class="Prova1">'.$rows1['id'].'</div>';
if($count == $size)
echo ('</div>');
$count ++;
}