本文整理汇总了PHP中Utility::checkBox方法的典型用法代码示例。如果您正苦于以下问题:PHP Utility::checkBox方法的具体用法?PHP Utility::checkBox怎么用?PHP Utility::checkBox使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Utility
的用法示例。
在下文中一共展示了Utility::checkBox方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: foreach
<td style="background:#ABCDEF">
<?php
Utility::dropDownList('exam_id', 'exam_id', 'exams');
?>
</td>
</tr>
<?php
foreach ($sections as $key => $value) {
echo '<tr>';
echo '<td>' . $value . '</td>';
echo '<td>';
echo '<table>';
foreach ($subjects[$key] as $k => $v) {
echo "<tr><td>" . $subject_name[$v] . " : </td><td>";
$id = $key . "-" . $v;
Utility::checkBox($id, $id);
echo '</td>';
}
echo '</table>';
echo '</td>';
echo '</tr>';
}
?>
</table>
<div style="padding:5px">
<?php
Utility::submitButton('save_subjects', 'save_subjects', 'Save Subjects');
?>
</td>
示例2: foreach
<?php
foreach ($students as $key => $value) {
?>
<tr id="<?php
echo $value['id'];
?>
" class="student_list">
<td><?php
echo $value['roll_no'];
?>
</td>
<td><?php
echo $value['name'];
Utility::inputHidden('students[]', 'students[]', $value['id']);
?>
</td>
<td><?php
if (isset($marked[$value['id']]) && $marked[$value['id']] == 1) {
Utility::checkBox($value['id'], $value['id'], 'presence', 1);
} else {
Utility::checkBox($value['id'], $value['id'], 'presence');
}
?>
</td>
</tr>
<?php
}
?>
</div>
示例3:
<td class="form_input">
<?php
Utility::inputText("correspondence_pincode", "correspondence_pincode", "Pincode");
?>
</td>
</tr>
<tr>
<td class="label">
<?php
Utility::label("permanent_address", "Permanent Address");
?>
</td>
<td class="form_input">
<?php
Utility::checkBox("same_as_above", "same_as_above", "same_as_above");
?>
</td>
</tr>
<tr>
<td class="label">
</td>
<td class="form_input">
<?php
Utility::inputText("permanent_address_line_1", "permanent_address_line_1", "Line 1");
?>
</td>
</tr>
<tr>
示例4: foreach
</tr>
<?php
foreach ($employees as $key => $value) {
?>
<tr id="<?php
echo $key;
?>
" class="employee_list">
<td><?php
echo $key;
?>
</td>
<td><?php
echo $value;
Utility::inputHidden('employees[]', 'employees[]', $key);
?>
</td>
<td><?php
if (isset($marked[$key]) && $marked[$key] == 1) {
Utility::checkBox($key, $key, 'presence', 1);
} else {
Utility::checkBox($key, $key, 'presence');
}
?>
</td>
</tr>
<?php
}
?>
</table>