?
Dieses Dokument verwendet PHP-Handbuch für chinesische Websites Freigeben
Attribute Name | Type | Required | Default | Description |
---|---|---|---|---|
name | string | No | checkbox | name of checkbox list |
values | array | Yes, unless using options attribute | n/a | an array of values for checkbox buttons |
output | array | Yes, unless using options attribute | n/a | an array of output for checkbox buttons |
selected | string/array | No | empty | the checked checkbox element(s) |
options | associative array | Yes, unless using values and output | n/a | an associative array of values and output |
separator | string | No | empty | string of text to separate each checkbox item |
labels | boolean | No | true | add <label>-tags to the output |
屬性 | 類型 | 是否必須 | 缺省值 | 描述 |
---|---|---|---|---|
name | string | No | checkbox | 復(fù)選按鈕組的名稱 |
values | array | Yes, 或指定 options 屬性 | n/a | 包含復(fù)選按鈕組值的數(shù)組 |
output | array | Yes, 或指定 options 屬性 | n/a | 包含復(fù)選按鈕組顯示值的數(shù)組 |
selected | string/array | No | empty | 已選定的元素或元素?cái)?shù)組 |
options | associative array | Yes,或指定 values 屬性 | n/a | 包含值和顯示的關(guān)聯(lián)數(shù)組 |
separator | string | No | empty | 分隔每個(gè)復(fù)選按鈕的字符串 |
labels | boolean | No | true | 是否為每個(gè)復(fù)選按鈕添加 <label> 標(biāo)簽 |
html_checkboxes is a custom function that creates an html checkbox group with provided data. It takes care of which item(s) are selected by default as well. Required attributes are values and output, unless you use options instead. All output is XHTML compatible.
自定義函數(shù) html_checkboxes 根據(jù)給定的數(shù)據(jù)創(chuàng)建復(fù)選按鈕組. 該函數(shù)可以指定哪些元素被選定. 要么必須指定 values 和 ouput 屬性,要么指定 options 替代. 所有的輸出與 XHTML 兼容.
All parameters that are not in the list above are printed as name/value-pairs inside each of the created <input>-tags.
上表未提到的其它參數(shù)在 <input> 標(biāo)簽中以"名稱/屬性"對(duì)的方式顯示.
Example 8-6. html_checkboxes
|