#questions td:nth-of-type(2):before { content: "<?php 
echo get_text('Question');
?>
"; }
#questions td:nth-of-type(3):before { content: "<?php 
echo get_text('Action');
?>
"; }

#poll td:nth-of-type(1):before { content: "<?php 
echo get_text('Question');
?>
"; }
<?php 
for ($value = 1; $value < 7; $value++) {
    echo '#poll td:nth-of-type(' . ($value + 1) . '):before { content: "' . get_answer_name($value) . '"; text-align: left;:}';
}
?>
#parameters td:nth-of-type(1):before { content: "<?php 
echo get_text('ID');
?>
"; }
#parameters td:nth-of-type(2):before { content: "<?php 
echo get_text('Value');
?>
"; }
#parameters td:nth-of-type(3):before { content: "<?php 
echo get_text('Action');
?>
"; }
         if ($category['ID'] == $question['Category']) {
             $pdf->SetFont('Arial', '', 12);
             $pdf->Cell(10, 3, $key + 1, 0, 0);
             $pdf->MultiCell(175, 5, $question['Question'], 0, 'L');
             $pdf->SetFont('Arial', 'B', 12);
             $pdf->Cell(10);
             $avg_score = get_average_score_user($id, $question['ID']);
             if ($avg_score == false) {
                 $avg_score = get_answer_name(6);
             }
             $pdf->Cell(5, 10, get_text('Average_score') . ': ' . $avg_score, 0, 0);
             $pdf->Ln(5);
             $pdf->Cell(10);
             $your_score = get_answer(get_poll_by_reviewer_reviewee_batch($id, $id, $batch), $question['ID']);
             if ($your_score == 6) {
                 $your_score = get_answer_name(6);
             }
             $pdf->Cell(5, 10, get_text('Your_score') . ': ' . $your_score, 0, 0);
             $pdf->Ln(10);
             if ($pdf->GetY() > 250) {
                 $pdf->AddPage();
             }
         }
     }
 }
 if ($comments) {
     $pdf->Ln(5);
     $pdf->SetFont('Arial', 'B', 12);
     $pdf->Cell(175, 10, get_text('Extra') . ' ' . get_text('Comment'), 0, 'C');
     $pdf->Ln(10);
     $pdf->Line(10, $pdf->GetY(), 200, $pdf->GetY());
function get_user_info($id, $batch)
{
    $id = (int) $id;
    $batch = (int) $batch;
    $user = get_user_by_id($id);
    $reviews_given = get_number_of_reviews_given($id);
    $reviews_received = get_number_of_reviews_received($id);
    $teammember_reviews = get_number_of_poll_team_members($id);
    $notteammember_reviews = get_number_of_poll_not_team_members($id);
    $teammanager_reviews = get_number_of_poll_team_manager($id);
    $notteammanager_reviews = get_number_of_poll_not_team_manager($id);
    $preferred_reviewers = get_number_of_preferred_reviewers($id);
    $preferred_reviewees = get_number_of_preferred_reviewees($id);
    $comments = get_comments($id);
    $questions = get_questions();
    echo get_text('Reviews_received') . ": <b>{$reviews_received}</b><br />" . get_text('Reviews_from_teammember') . ": <b>{$teammember_reviews}</b><br />" . get_text('Reviews_from_not_teammember') . ": <b>{$notteammember_reviews}</b><br />" . get_text('Reviews_from_preferred_reviewer') . ": <b>{$preferred_reviewers}</b><br />";
    //        get_text('Reviews_given_to_preferred_reviewee') . ": <b>$preferred_reviewees</b><br />";
    ?>
    <h3><?php 
    echo get_Text('Average_score');
    ?>
</h3>
    <h4><?php 
    echo get_text('Legend');
    ?>
</h4>
    <p>
        1: <?php 
    echo get_answer_name(1);
    ?>
<br/>
        2: <?php 
    echo get_answer_name(2);
    ?>
<br/>
        3: <?php 
    echo get_answer_name(3);
    ?>
<br/>
        4: <?php 
    echo get_answer_name(4);
    ?>
<br/>
        5: <?php 
    echo get_answer_name(5);
    ?>
    </p>
    <table class="questions">
        <?php 
    $number = 1;
    $categories = get_categories();
    foreach ($categories as $category) {
        ?>
        <thead>
        <tr style="margin-top: 25px;">
            <th><?php 
        echo $category['Name'];
        ?>
</th>
            <th><?php 
        echo get_text('Average_score');
        ?>
</th>
            <th><?php 
        echo get_text('Your_score');
        ?>
</th>
        </tr>
        </thead>
        <tbody>
        <?php 
        foreach ($questions as $question) {
            if ($category['ID'] == $question['Category']) {
                ?>
                <tr id="poll">
                    <td><?php 
                echo $number . '. ' . $question['Question'];
                ?>
</td>
                    <td style="text-align:center;"><?php 
                $avg_score = get_average_score_user($id, $question['ID']);
                if ($avg_score == false) {
                    $avg_score = get_answer_name(6);
                }
                echo $avg_score;
                ?>
                    </td>
                    <td style="text-align:center;">
                        <?php 
                $your_score = get_answer(get_poll_by_reviewer_reviewee_batch($id, $id, $batch), $question['ID']);
                if ($your_score == 6) {
                    $your_score = get_answer_name(6);
                }
                echo $your_score;
                ?>
                    </td>
                </tr>
                <?php 
                $number++;
            }
        }
        ?>
        <tr class="spacer"></tr>
        <?php 
    }
    ?>
        </tbody>
        <?php 
    ?>
    </table>
    <!--<tr>
				<th></th>
				<th><?php 
    echo get_text('Question');
    ?>
</th>
				<th><?php 
    echo get_text('Your_score') . '-' . get_text('Average_score');
    ?>
</th>
			</tr>
		<?php 
    foreach ($questions as $key => $question) {
        ?>
			<tr>
				<td>
					<?php 
        echo $key + 1;
        ?>
				</td>
				<td>
					<?php 
        echo $question['Question'];
        ?>
				</td>
				<td style="text-align:center;">
					<?php 
        echo get_answer_name(get_answer(get_poll_by_reviewer_reviewee_batch($id, $id, $batch), $question['ID']));
        echo " - " . get_average_score($id, $question['ID']);
        ?>

				</td>
			</tr>
			<?php 
    }
    ?>
	</table>-->
    <?php 
    if ($comments) {
        echo "<h3>" . get_text('Extra_comment') . ":</h3>";
        foreach ($comments as $comment) {
            ?>
            <div class="comment"><?php 
            echo $comment['Comment'];
            ?>
</div>
        <?php 
        }
    }
}
    <table class="questions">
        <?php 
$number = 1;
foreach ($categories as $category) {
    ?>
        <thead>
        <tr style="margin-top: 25px;">
            <th><?php 
    echo $category['Name'];
    ?>
</th>
            <?php 
    for ($value = 1; $value < 7; $value++) {
        ?>
                <th style="font-size: 12px;"><?php 
        echo get_answer_name($value);
        ?>
</th>
            <?php 
    }
    ?>
        </tr>
        </thead>
        <tbody>
        <?php 
    foreach ($questions as $question) {
        if ($category['ID'] == $question['Category']) {
            ?>
                <tr id="poll">
                    <td><?php 
            echo $number . '. ' . $question['Question'];