<?php

$unknown = !!@$newContentData['unknown'];
$count = isset($newContentData['count']) ? intval($newContentData['count']) : 0;

if(!$unknown) {
for ($i = 0; $i < $count; $i++) { ?>

    <div class="mb-3">
        <div class="">
            <b><?= $newContentData['item_' . $i . '_relationship'] ?></b>
            /
            <span class="text-secondary"><?= $newContentData['item_' . $i . '_status'] ?></span>
        </div>
        <div class="ml-4">
            <?= isset($newContentData['item_' . $i . '_general_no_health_concern']) ? '<div>No health concern: <b>' . $newContentData['item_' . $i . '_general_no_health_concern'] . '</b></div>' : '' ?>
            <?= isset($newContentData['item_' . $i . '_general_arthritis']) ? '<div>Arthritis: <b>' . $newContentData['item_' . $i . '_general_arthritis'] . '</b></div>' : '' ?>
            <?= isset($newContentData['item_' . $i . '_general_asthma']) ? '<div>Asthma: <b>' . $newContentData['item_' . $i . '_general_asthma'] . '</b></div>' : '' ?>
            <?= isset($newContentData['item_' . $i . '_general_bleeding_disorder']) ? '<div>Bleeding disorder: <b>' . $newContentData['item_' . $i . '_general_bleeding_disorder'] . '</b></div>' : '' ?>
            <?= isset($newContentData['item_' . $i . '_general_cad_lt_age_55']) ? '<div>CAD &gt; age 55: <b>' . $newContentData['item_' . $i . '_general_cad_lt_age_55'] . '</b></div>' : '' ?>
            <?= isset($newContentData['item_' . $i . '_general_copd']) ? '<div>COPD: <b>' . $newContentData['item_' . $i . '_general_copd'] . '</b></div>' : '' ?>
            <?= isset($newContentData['item_' . $i . '_general_diabetes']) ? '<div>Diabetes: <b>' . $newContentData['item_' . $i . '_general_diabetes'] . '</b></div>' : '' ?>
            <?= isset($newContentData['item_' . $i . '_general_heart_attack']) ? '<div>Heart attack: <b>' . $newContentData['item_' . $i . '_general_heart_attack'] . '</b></div>' : '' ?>
            <?= isset($newContentData['item_' . $i . '_general_heart_disease']) ? '<div>Heart disease: <b>' . $newContentData['item_' . $i . '_general_heart_disease'] . '</b></div>' : '' ?>
            <?= isset($newContentData['item_' . $i . '_general_high_cholesterol']) ? '<div>High cholesterol: <b>' . $newContentData['item_' . $i . '_general_high_cholesterol'] . '</b></div>' : '' ?>
            <?= isset($newContentData['item_' . $i . '_general_hypertension']) ? '<div>Hypertension: <b>' . $newContentData['item_' . $i . '_general_hypertension'] . '</b></div>' : '' ?>
            <?= isset($newContentData['item_' . $i . '_general_mental_illness']) ? '<div>Mental illness: <b>' . $newContentData['item_' . $i . '_general_mental_illness'] . '</b></div>' : '' ?>
            <?= isset($newContentData['item_' . $i . '_general_osteoporosis']) ? '<div>Osteoporosis: <b>' . $newContentData['item_' . $i . '_general_osteoporosis'] . '</b></div>' : '' ?>
            <?= isset($newContentData['item_' . $i . '_general_stroke']) ? '<div>Stroke: <b>' . $newContentData['item_' . $i . '_general_stroke'] . '</b></div>' : '' ?>
            <?= isset($newContentData['item_' . $i . '_cancer_breast_ca']) ? '<div>Breast cancer: <b>' . $newContentData['item_' . $i . '_cancer_breast_ca'] . '</b></div>' : '' ?>
            <?= isset($newContentData['item_' . $i . '_cancer_colon_ca']) ? '<div>Colon cancer: <b>' . $newContentData['item_' . $i . '_cancer_colon_ca'] . '</b></div>' : '' ?>
            <?= isset($newContentData['item_' . $i . '_cancer_other_ca']) ? '<div>Other cancer: <b>' . $newContentData['item_' . $i . '_cancer_other_ca'] . '</b></div>' : '' ?>
            <?= isset($newContentData['item_' . $i . '_cancer_ovarian_ca']) ? '<div>Ovarian cancer: <b>' . $newContentData['item_' . $i . '_cancer_ovarian_ca'] . '</b></div>' : '' ?>
            <?= isset($newContentData['item_' . $i . '_cancer_uterine_ca']) ? '<div>Uterine cancer: <b>' . $newContentData['item_' . $i . '_cancer_uterine_ca'] . '</b></div>' : '' ?>
        </div>
        <?php if(isset($newContentData['item_' . $i . '_comments']) && !empty($newContentData['item_' . $i . '_comments'])): ?>
        <div class="text-secondary pb-2 mb-2">
            <b>Comments: </b><?= $newContentData['item_' . $i . '_comments'] ?>
        </div>
        <?php endif; ?>
    </div>

<?php }
}
else {
    ?>
    <div class="mb-3">
        <b>Family History is unknown/unavailable</b>
    </div>
    <?php
}
