<div class="section">
    <div class="container">
        <div class="row justify-content-center align-items-center">
            <div class="col-lg-11 col-12">
                <div class="head-sec">
                    <div class="tt fs-3">Frequently <span>Asked Questions</span></div>
                </div>
                <div class="accordion" id="accordionExample">
                <?php $i = 1;

$faq_sql = mysqli_query($GLOBALS['dbconn'], "select answer, slno, question from faq_tbl where category_id='$category_id' order by slno ASC");

while ($faq_res = mysqli_fetch_array($faq_sql)) { ?>
                    <div class="accordion-item">
                        <div class="accordion-header">
                            <button class="accordion-button <?= $i == '1' ? '' : 'collapsed'; ?>" type="button" data-bs-toggle="collapse" data-bs-target="#collapse<?= $faq_res['slno']; ?>" aria-expanded="true" aria-controls="collapse<?= $faq_res['slno']; ?>"><?= str_ireplace('{companyName}', $admin_res['companyName'], $faq_res['question']); ?></button>
                        </div>
                        <div id="collapse<?= $faq_res['slno']; ?>" class="accordion-collapse collapse <?= $i == '1' ? 'show' : ''; ?>" data-bs-parent="#accordionExample">
                            <div class="accordion-body">
                            <p><?= str_ireplace('{companyName}', $admin_res['companyName'], $faq_res['answer']); ?></p>
                            </div>
                        </div>
                    </div>
                    <?php $i++;
            } ?>
                  
                </div>
            </div>
        </div>
    </div>
</div>