html5 - Dropdown list in PHP MVC -


i looking way create drop down list depending on user chooses. if user picks package of 1 profile the output give user drop down list 1 field if user chooses 2 profiles output give user drop down 2 fields. code displays 1 dropdown if user chooses second option developing website using php , javascript

<ul class="dropdown-menu <?= empty($business) ? 'hidden' : '' ?>" aria-labelledby="business_list"> <?php foreach ($business $key => $item) : ?>     <li><?= html::a($item->name, ['social-manager/profiles', 'b' => $key]) ?></li> <?php endforeach; ?> </ul> 

try this..

<ul class="dropdown-menu <?php if(empty($business)) echo 'hidden'; ?> aria-labelledby="business_list"> <?php if(!empty($business)) {    foreach($business $key => $value){ ?>       <li><?php echo $value->name;?></li>    <?php } } ?> </ul> 

Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -