<?php if (!empty($titles) && is_array($titles) && count($titles) > 0): ?>
    <?php foreach ($titles as $title): ?>
        <?php list($heading, $title, $styles) = $rdgb->helpers->get_title($title); ?>

        <?php if(!empty($title)): ?>
            <div class="title" style="<?php echo $styles; ?>">
                <<?php echo $heading; ?>><?php echo $title; ?></<?php echo $heading; ?>>
            </div>
        <?php endif; ?>
    <?php endforeach; ?>
<?php endif; ?>
