<table class="table table-hover">
	<thead>
		<tr>
      <th>Subscription Pack</th>
			<th>Exam Standards</th>
			<th>Amount</th>
			<th>Duration</th>
			<th>No. of Exams</th>
			<th>Actions</th>
		</tr>
	</thead>
	<tbody>
		<?php foreach($subscriptions_packs as $subscriptions_pack): ?>
      <tr>
        <td>
          <?= $subscriptions_pack->subscription_pack_name; ?>
        </td>
        <td>
          <?php
            $selected_exam_standards = '';
            foreach($exam_standards as $exam_standard){
              if(in_array($exam_standard->exam_standard_ID, explode(',',$subscriptions_pack->exam_standards))) {
                $selected_exam_standards .= $exam_standard->standard_name.', ';
              }
            }
            echo rtrim($selected_exam_standards,', ');
          ?>
        </td>
        <td>
          <span class="fa fa-inr"></span> <?= $subscriptions_pack->subscription_amount; ?>
        </td>
        <td>
          <?= $subscriptions_pack->duration; ?> Days
        </td>
        <td>
          <?= $subscriptions_pack->no_of_exams; ?>
        </td>
        <td>
          <div style="width:80px;">
            <?php echo edit_action(base_url('subscription_packs'),$subscriptions_pack->subscription_pack_ID); ?>
              <?php echo delete_action(base_url('subscription_packs'),$subscriptions_pack->subscription_pack_ID); ?>
          </div>
        </td>
      </tr>
      <?php endforeach; ?>
	</tbody>
</table>