本文整理汇总了PHP中data::getCompetitions方法的典型用法代码示例。如果您正苦于以下问题:PHP data::getCompetitions方法的具体用法?PHP data::getCompetitions怎么用?PHP data::getCompetitions使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类data
的用法示例。
在下文中一共展示了data::getCompetitions方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: data
function data($data)
{
include 'class.data.php';
$class = new data();
if ($data->method == "GET") {
switch ($data->subaction) {
case "defaultData":
return $class->getDefaultData();
break;
case "seasons":
return $class->getSeasons();
break;
case "teams":
return $class->getExternalTeams();
break;
case "competitions":
return $class->getCompetitions($data->data->season);
break;
case "players":
return $class->getPlayers($data->data->filter);
break;
default:
return;
}
}
}
示例2: data
$data = new data();
foreach ($data->getSeasons(true) as $season) {
$selected = "";
if ($season["id"] == $_GET["seizoen"]) {
$selected = "SELECTED";
}
echo "<option value=\"" . $season["id"] . "\" " . $selected . ">" . $season["naam"] . "</option>";
}
?>
</select>
</div>
<div class="form-group">
<select name="competitie" class="form-control" onchange="this.form.submit()">
<option value="">Selecteer een competitie</option>
<?php
foreach ($data->getCompetitions($_GET["seizoen"]) as $competition) {
$selected = "";
if ($competition["id"] == $_GET["competitie"]) {
$selected = "SELECTED";
}
echo "<option value=\"" . $competition["id"] . "\" " . $selected . ">" . $competition["naam"] . "</option>";
}
?>
</select>
</div>
</form>
</div>
</nav>
<?php
$init->errorClass->display_errors();