<div class="<?= $parentDivClasses ; ?>">
    <?php foreach ($contentArray as $content):
        if (isset($content)): ?>
        <span class="<?= $content[0] ?>">
            <?= $content[1] ; ?>
            <?php if(isset($content['extraSpan'])): ?>
                : <span> <?= $content['extraSpan'] ?> </span>
            <?php endif ; ?>
        </span>
    <?php endif ;
        endforeach ; ?>
</div>
