本文整理匯總了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 {