<table width="500" border="0" cellpadding="0" cellspacing="0">
<?php if($question->type=="RADIO"): ?>
    <tr>
        <td width="50" align="center"><input type="radio"></td>
        <td align="left" width="450" valign="bottom"><?php echo Answer::getAnswerName($answer->answer); ?></td>
    </tr>
<?php elseif($question->type=="ARRAY"): ?>
    <?php foreach($group->arrayAnswer as $answer_array): ?>
    <tr>
        <td width="50" align="center"><input type="checkbox"></td>
        <td width="450" valign="bottom"><?php echo $answer_array->title; ?></td>
    </tr>
    <?php endforeach; ?>
<?php elseif($question->type=="SEL"): ?>
    <tr>
        <td width="50" align="center"><input type="radio"></td>
        <td width="450" valign="bottom"><?php echo Answer::getAnswerName($answer->answer); ?></td>
    </tr>
<?php elseif($question->type=="MUL_SEL"): ?>
    <tr>
        <td width="50" align="center"><input type="checkbox"></td>
        <td width="450" valign="bottom"><?php echo Answer::getAnswerName($answer->answer); ?></td>
    </tr>
<?php elseif($question->type=="TEXT"): ?>
    <tr>
        <td colspan="2" width="500" align="center">
            <textarea rows="50"></textarea>
        </td>
    </tr>
<?php elseif($question->type=="NUMERIC"): ?>
    <tr>
        <td width="500" colspan="2" align="center">
            <br>
            <input type="text" value=" ">
            <br>
        </td>
    </tr>
<?php else: ?>
    <tr>
        <td width="500" colspan="2">
            <?php echo Answer::getAnswerName($answer->answer); ?>
        </td>
    </tr>
<?php endif; ?>

<?php if(isset($answer->questions)): ?>
    <tr>
        <td width="500" colspan="2" style="padding:10px 0">
            <table width="100%" border="1" cellpadding="10" cellspacing="0">
                <tr>
                    <td>
                        <?php if(isset($answer->headerText)): ?>
                            <h4><?php echo $answer->headerText; ?></h4><br>
                        <?php endif; ?>
                        <?php foreach($answer->questions as $answer_questions): ?>
                            <?php echo $__env->make('test.template.questions',array("question"=>$answer_questions), array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
                        <?php endforeach; ?>
                    </td>
                </tr>
            </table>
        </td>
    </tr>
<?php endif; ?>
</table>