{foreach $header as $pole}
{$pole}
{/foreach}
{foreach $sestava as $row}
{foreach $header as $pole}
{$row->$pole}
{/foreach}
{/foreach}