public static function PopulateBranchViewModelList($branchs) { for ($i = 0; $i < count($branchs); $i++) { $models[$i] = BranchHelper::PopulateBranchViewModel($branchs[$i]); } return $models; }
<tr> <td colspan="5" class="text-right"> <form class="form-horizontal"> <div class="form-group"> <p class="col-sm-2"></p> <p class="col-sm-10 text-left" id="error" style="color: red"></p> </div> <div class="form-group"> <label for="inputAddress" class="col-sm-2 control-label">Выберите место получения заказа</label> <div class="col-sm-10"> <select class="form-control" id="inputAddress"> <?php $branchs = BranchHelper::PopulateBranchViewModelList(BranchService::GetAll()); for ($i = 0; $i < count($branchs); $i++) { ?> <option><?php echo $branchs[$i]->address; ?> </option> <?php } ?> </select> </div> </div> <div class="form-group"> <div class="col-sm-offset-2 col-sm-10"> <button type="button" onclick="ConfirmOrder(this)" class="btn btn-default">Продолжить</button>