本文整理汇总了PHP中AdminController::getDistrictsByCitiesStatesCountryId方法的典型用法代码示例。如果您正苦于以下问题:PHP AdminController::getDistrictsByCitiesStatesCountryId方法的具体用法?PHP AdminController::getDistrictsByCitiesStatesCountryId怎么用?PHP AdminController::getDistrictsByCitiesStatesCountryId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AdminController
的用法示例。
在下文中一共展示了AdminController::getDistrictsByCitiesStatesCountryId方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: while
<?php
echo $row['name'];
?>
</option>
<?php
}
}
?>
</select>
</div>
<div class="form-group">
<label>District</label>
<select class="form-control ddlDistrict" name="ddlDistrict" id="ddlDistrict">
<option value="">-select-</option>
<?php
$dataDistrict = $adminController->getDistrictsByCitiesStatesCountryId($city_id, $state_id, $country_id);
if (!empty($dataDistrict)) {
$cnt = 1;
while ($row = mysql_fetch_array($dataDistrict)) {
?>
<option value="<?php
echo $row['id'];
?>
" <?php
if ($data['district_id'] == $row['id']) {
echo 'selected';
}
?>
>
<?php
echo $row['name'];
示例2: AdminController
<?php
include '../assets/config.php';
if (!empty($_POST['country_id']) && !empty($_POST['state_id']) && !empty($_POST['city_id'])) {
$adminController = new AdminController();
$data = $adminController->getDistrictsByCitiesStatesCountryId($_POST['city_id'], $_POST['state_id'], $_POST['country_id']);
echo '<option value="">-select-</option>';
while ($row = mysql_fetch_array($data)) {
echo '<option value="' . $row['id'] . '">' . $row['name'] . '</option>';
}
}