本文整理汇总了PHP中Options::groups方法的典型用法代码示例。如果您正苦于以下问题:PHP Options::groups方法的具体用法?PHP Options::groups怎么用?PHP Options::groups使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Options
的用法示例。
在下文中一共展示了Options::groups方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: printr
<?php
//Bootstrap SPF
require 'includes/master.inc.php';
//This loads up $user - $isadmin - $js
require 'includes/user.inc.php';
printr(gimme(Options::groups(), 'group'));
?>
<form method="post">
<select name='option' title='Options'>
<?php
echo get_options('options', 'key', 'key', @$_POST['option']);
?>
</select>
<select name='group' title='Groups of options'>
<?php
echo get_options('options_groups', 'group', 'group', @$_POST['group']);
?>
</select>
<select name='type' title='Type of variable'>
<?php
echo array2options(Options::types(), @$_POST['type']);
?>
</select>
<input type='hidden' name='action' value='update' />
<input type='submit' class='input-large' value='Update' />
</form>
<?php
示例2: strtolower
}
$hash = strtolower(str_replace(" ", "", $group['group']));
$title = $group['desc'];
echo '<li class="' . $active . '">
<a data-toggle="tab" title="' . $title . '" href="#' . $hash . '">' . $group["group"] . '</a>
</li>';
$i++;
}
?>
</ul>
<div id="myTabContent" class="tab-content">
<?php
$i = 0;
foreach (Options::groups() as $group) {
$active = '';
if ($i == 0) {
$active = " active in";
}
$hash = strtolower(str_replace(" ", "", $group['group']));
$title = $group['desc'];
$name = $group['group'];
echo '<div id="' . $hash . '" class="tab-pane fade' . $active . '">
<div class="well">
<h3>' . $name . ' <small>' . $title . '</small></h3>
<br />';
$options = Options::getList(false, $name);
if (empty($options)) {
echo "No results found";
} else {