I am looking for a way to create a drop down list depending on what the user chooses. If the user picks the package of one profile the the output will give the user a drop down list with 1 field if the user chooses two profiles the output will give the user a drop down with 2 fields. The code recently displays just one dropdown even if the user chooses the second option
<ul class="dropdown-menu <?= empty($business) ? 'hidden' : '' ?>" aria-labelledby="business_list">
<?php foreach ($business as $key => $item) : ?>
<li><?= Html::a($item->name, ['social-manager/profiles', 'b' => $key]) ?></li>
<?php endforeach; ?>
</ul>