Help for this page
while (@rown = $sthn->fetchrow_array())
foreach $filiais (@filiais){ # print an html header (you don't need $cnt2 for this) ... } } }