</tr>
                <tr>
                    <th>Recenzent</th>
                    <th>orig.</th>
                    <th>téma</th>
                    <th>tech.</th>
                    <th>jaz.</th>
                    <th>dop.</th>
                    <th></th>
                </tr>
            </thead>
            <tbody>

                <?php 
$settingModel = new SettingModel();
$articles = $settingModel->getAllArticlesWithReview();
$reviewers = $settingModel->getAllReviewers();
foreach ($articles as $article) {
    $reviewed = $settingModel->getAllReviewed($article['id_article']);
    if ($article['result'] == 1) {
        $result = "Přijmuto";
    } else {
        $result = "Nepřijmuto";
    }
    echo '<tr>' . '<td rowspan="4" style="vertical-align: middle;">' . $article['article_name'] . '</td>' . '<td rowspan="4" style="vertical-align: middle;">' . $article['name'] . ", " . $article['authors'] . '</td>';
    if (count($reviewed) > 0) {
        echo '<tr><td class="text-left">' . $reviewed[0]['name'] . '</td>' . '<td  class="text-midle">' . $reviewed[0]['originalsReview'] . '</td>' . '<td  class="text-midle">' . $reviewed[0]['themeReview'] . '</td>' . '<td  class="text-midle">' . $reviewed[0]['technicalReview'] . '</td>' . '<td  class="text-midle">' . $reviewed[0]['languagesReview'] . '</td>' . '<td  class="text-midle">' . $reviewed[0]['recommendationReview'] . '</td>' . '<td  class="text-midle">' . '<input type="hidden" value="' . $reviewed[0]['id_reviewer'] . '" ">' . '<button class="btn btn-danger btn-xs removeReviewer" id="' . $article['id_article'] . '"><i class="fa fa-trash-o"></button></td>' . '    <td rowspan="4" class="text-midle">' . $result . '</td></tr>';
        if (count($reviewed) > 1) {
            echo '<tr><td  class="text-left"">' . $reviewed[1]['name'] . '</td>' . '<td  class="text-midle"">' . $reviewed[1]['originalsReview'] . '</td>' . '<td  class="text-midle"">' . $reviewed[1]['themeReview'] . '</td>' . '<td  class="text-midle"">' . $reviewed[1]['technicalReview'] . '</td>' . '<td  class="text-midle"">' . $reviewed[1]['languagesReview'] . '</td>' . '<td  class="text-midle"">' . $reviewed[1]['recommendationReview'] . '</td>' . '<td  class="text-midle""><input type="hidden" value="' . $reviewed[0]['id_reviewer'] . '" ">' . '<button class="btn btn-danger btn-xs removeReviewer" id="' . $article['id_article'] . '"><i class="fa fa-trash-o"></button></td></tr>';
            if (count($reviewed) > 2) {
                echo '<tr><td  class="text-left"">' . $reviewed[2]['name'] . '</td>' . '<td  class="text-midle"">' . $reviewed[2]['originalsReview'] . '</td>' . '<td  class="text-midle"">' . $reviewed[2]['themeReview'] . '</td>' . '<td  class="text-midle"">' . $reviewed[2]['technicalReview'] . '</td>' . '<td  class="text-midle"">' . $reviewed[2]['languagesReview'] . '</td>' . '<td  class="text-midle"">' . $reviewed[2]['recommendationReview'] . '</td>' . '<td  class="text-midle""><input type="hidden" value="' . $reviewed[0]['id_reviewer'] . '" ">' . '<button class="btn btn-danger btn-xs removeReviewer" id="' . $article['id_article'] . '"><i class="fa fa-trash-o"></button></td></tr>';