亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

html_checkboxes関數(shù)

html_checkboxes 関數(shù)

カスタム関數(shù) html_checkboxes は、指定されたデータに基づいてチェック ボタン グループを作成します。この関數(shù)は次のことを指定できます。どの要素が選択されているか、値と出力のいずれかを指定する必要があります 屬性を指定するか、代わりにオプションを指定してください。すべての出力は XHTML と互換性があります。

eg1:

test.php:
require('Smarty.class.php');
$smarty = 新しい Smarty;
$smarty->assign('cust_ids', array(1000,1001,1002,1003));
$smarty->assign('cust_names', array('Joe Schmoe','Jack Smith','Jane Johnson','Charlie Brown'));
$smarty->assign('customer_id' , 1001);
$smarty->display('test.html');

test.html:
{html_checkboxes 値=$cust_ids チェック済み=$customer_id 出力=$cust_names separator="<br />"}


出力: (両方の例)
微信圖片_20180313114508.png


eg2:

test.php:
require('Smarty.class.php') ;
$smarty = 新しい Smarty;
$smarty->assign('cust_checkboxes', array(
1000 => 'ジョー シュモー',
1001 => 'ジャック スミス',
1002 => 'ジェーン ジョンソン',
1003 => 'チャーリー ブラウン'));
$smarty->assign('customer_id', 1001);
$smarty-> ;display('test.html');

test.html:
{html_checkboxes name="id" options=$cust_checkboxes selected=$customer_id Separator="<br />"}

出力:

微信圖片_20180313114508.png

學(xué)び続ける
||
<?php echo "html_checkboxes函數(shù)";
提出するリセットコード