本文整理汇总了PHP中Spotter::getAllAirlineCountries方法的典型用法代码示例。如果您正苦于以下问题:PHP Spotter::getAllAirlineCountries方法的具体用法?PHP Spotter::getAllAirlineCountries怎么用?PHP Spotter::getAllAirlineCountries使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Spotter
的用法示例。
在下文中一共展示了Spotter::getAllAirlineCountries方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
foreach ($airline_names as $airline_name) {
if (isset($_GET['airline']) && $_GET['airline'] == $airline_name['airline_icao']) {
print '<option value="' . $airline_name['airline_icao'] . '" selected="selected">' . $airline_name['airline_name'] . ' (' . $airline_name['airline_icao'] . ')</option>';
} else {
print '<option value="' . $airline_name['airline_icao'] . '">' . $airline_name['airline_name'] . ' (' . $airline_name['airline_icao'] . ')</option>';
}
}
?>
</select>
</div>
<div class="form-group">
<label>Country</label>
<select name="airline_country" class="selectpicker" data-live-search="true">
<option></option>
<?php
$airline_countries = $Spotter->getAllAirlineCountries();
foreach ($airline_countries as $airline_country) {
if (isset($_GET['airline_country']) && $_GET['airline_country'] == $airline_country['airline_country']) {
print '<option value="' . $airline_country['airline_country'] . '" selected="selected">' . $airline_country['airline_country'] . '</option>';
} else {
print '<option value="' . $airline_country['airline_country'] . '">' . $airline_country['airline_country'] . '</option>';
}
}
?>
</select>
</div>
<div class="form-group">
<label>Callsign</label>
<input type="text" name="callsign" value="<?php
if (isset($_GET['callsign'])) {
print $_GET['callsign'];
示例2: foreach
foreach ($airline_names as $airline_name) {
if (isset($_GET['airline']) && $_GET['airline'] == $airline_name['airline_icao']) {
print '<option value="' . $airline_name['airline_icao'] . '" selected="selected">' . $airline_name['airline_name'] . ' (' . $airline_name['airline_icao'] . ')</option>';
} else {
print '<option value="' . $airline_name['airline_icao'] . '">' . $airline_name['airline_name'] . ' (' . $airline_name['airline_icao'] . ')</option>';
}
}
?>
</select>
</div>
<div class="form-group">
<label>Country</label>
<select name="airline_country" class="selectpicker" data-live-search="true">
<option></option>
<?php
$airline_countries = Spotter::getAllAirlineCountries();
foreach ($airline_countries as $airline_country) {
if (isset($_GET['airline_country']) && $_GET['airline_country'] == $airline_country['airline_country']) {
print '<option value="' . $airline_country['airline_country'] . '" selected="selected">' . $airline_country['airline_country'] . '</option>';
} else {
print '<option value="' . $airline_country['airline_country'] . '">' . $airline_country['airline_country'] . '</option>';
}
}
?>
</select>
</div>
<div class="form-group">
<label>Callsign</label>
<input type="text" name="callsign" value="<?php
if (isset($_GET['callsign'])) {
print $_GET['callsign'];