<div class="row">
<div class="col-md-12">
    <table class="table" id="currentdirectors">
    <caption>Current Directors</caption>
        <?php renderOfficerRows($this->officers); ?>
    </table>
    
    <table class="table" id="pastdirectors">
    <caption>Past Directors</caption>
        <?php renderOfficerRows($this->pastofficers); ?>
    </table>
    </div>
</div>

<?php

function renderOfficerRows($officers)
{
    $officerCount = 0;
?>
      <tr><th>Officer Name</th><th style="width:20%">Role</th><th style="width:10%">Status</th></tr>
      <?php foreach ($officers as $officer) : ?>
      <tr>
    			<td><a id="officer-id-<?php echo ++$officerCount ?>" href="/directories/people/<?php echo $officer['officerid']; ?>"><?php echo $officer['forename'] . ' ' . $officer['surname']; ?></a></td>
    			<td><?php echo $officer['appointmenttype']; ?></td>
    			<td><?php echo $officer['appointmentstatus']; ?>
    			
    		</tr>
      <?php endforeach; ?>
<?php
}
<div class="row">
<div class="col-md-12">
    <table class="table" id="currentdirectors">
    <caption>Current Directors</caption>
        <?php renderOfficerRows($this->officers); ?>
    </table>
    
    <table class="table" id="pastdirectors">
    <caption>Past Directors</caption>
        <?php renderOfficerRows($this->pastofficers); ?>
    </table>
    </div>
</div>

<?php

function renderOfficerRows($officers)
{
    $officerCount = 0;
?>
      <tr><th>Officer Name</th><th style="width:20%">Role</th><th style="width:10%">Status</th></tr>
      <?php foreach ($officers as $officer) : ?>
      <tr>
    			<td><a id="officer-id-<?php echo ++$officerCount ?>" href="/directories/people/<?php echo $officer['whoswhoid']; ?>"><?php echo $officer['forename'] . ' ' . $officer['surname']; ?></a></td>
    			<td><?php echo $officer['appointmenttype']; ?></td>
    			<td><?php echo $officer['appointmentstatus']; ?>
    			
    		</tr>
      <?php endforeach; ?>
<?php
}
Update officer list to reference whos who id
Update officer list to reference whos who id
