?
Dieses Dokument verwendet PHP-Handbuch für chinesische Websites Freigeben
Attribute Name | Type | Required | Default | Description |
---|---|---|---|---|
name | string | No | radio | name of radio list |
values | array | Yes, unless using options attribute | n/a | an array of values for radio buttons |
output | array | Yes, unless using options attribute | n/a | an array of output for radio buttons |
checked | string | No | empty | the checked radio element |
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 radio item |
屬性 | 類(lèi)型 | 是否必須 | 缺省值 | 描述 |
---|---|---|---|---|
name | string | No | radio | 單選按鈕列表的名稱(chēng) |
values | array | Yes, 或指定 options 屬性 | n/a | 包含單選按鈕值的數(shù)組 |
output | array | Yes, 或指定 options 屬性 | n/a | 包含單選按鈕顯示值的數(shù)組 |
checked | string | No | empty | 已選定的元素 |
options | associative array | Yes, 或指定 values 屬性 | n/a | 包含值和顯示的關(guān)聯(lián)數(shù)組 |
separator | string | No | empty | 分隔每個(gè)單選按鈕的字符串 |
html_radios is a custom function that creates html radio button group with provided data. It takes care of which item is selected by default as well. Required attributes are values and output, unless you use options instead. All output is XHTML compatible.
自定義函數(shù) html_radios 根據(jù)給定的數(shù)據(jù)創(chuàng)建單選按鈕組. 該函數(shù)可以指定哪個(gè)元素被選定. 要么必須指定 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)簽中以"名稱(chēng)/屬性"對(duì)的方式顯示.
Example 8-9. html_radios
|