<span id="count_resource_person">
    <?php
    $i = 0;
    foreach ($resource_person_info as $resource_person) {
        ++$i;
        ?>
        <div class="checkbox checkbox-success">
            <input type="checkbox" name="resource_person" class="course_checkbox"
                   id="resource_person<?php echo $resource_person->resource_person_id; ?>">
            <label for="resource_person"><?php echo $resource_person->person_first_name . ' ' . $resource_person->person_last_name; ?></label>
        </div>
        <?php
    }
    ?>
</span>
<?php
if ($i < $total_resource_person_info) {
    ?>
    <a
        id="moreResourcePerson<?php echo $resource_person->resource_person_id ?>" 
        href="javascript:void(0)" onclick="moreResourcePerson()">more</a>
        <?php
    }
    ?>

