<?php 
    $html = '';
    foreach($get as $no => $item) {
        $show     = $no == 0 ? 'show' : null;
        $expanded = $no == 0 ? 'aria-expanded="true"' : 'aria-expanded="false"';
        $html .= '
            <div class="accordion accordion-flush" id="ac-'.$no.'">
                <div class="accordion-item">
                    <h2 class="accordion-header" id="hd-'.$no.'">
                        <button class="accordion-button" 
                                data-bs-toggle="collapse" 
                                data-bs-target="#cl-'.$no.'" 
                                '.$expanded.' 
                                aria-controls="cl-'.$no.'" 
                        >
                        
                            '.$item -> title.'
                        
                        </button>
                    </h2>
                    <div id="cl-'.$no.'" class="accordion-collapse collapse '.$show.' " aria-labelledby="hd-'.$no.'" data-bs-parent="#ac-'.$no.'">
                        <div class="accordion-body p-0">
                            <ul class="list-group list-group-flush">
                            '; 
                                $i = 1;
                                foreach($item -> steps as $step) {
                                    $html .= '                                            
                                        <li class="list-group-item">
                                            '. $i . '. ' . $step.'
                                        </li>
                                    ';
                                    ++$i;
                                } 
                            $html .= ' 
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        ';
    }

    print_r($html);
?>