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
Post a Comment