[g5] 카테고리 여러개 선택하기
페이지 정보
본문
function get_ca_name($name, $ca_lang)
{
global $g5, $w, $config, $board;
$ca_name = array_map('trim', explode(',', $ca_lang));
$arr = array_map('trim', explode('|', $board['bo_category_list']));
$str = '';
for ($i=0; $i<count($arr); $i++)
{
if (trim($arr[$i]))
$str .= "<input type='checkbox' name='ca_name[]' value='{$arr[$i]}' id='ca_name_".$i."'";
if (in_array("{$arr[$i]}", $ca_name)) $str .= " checked='checked'";
$str .= "> <label for='ca_name_".$i."'> {$arr[$i]}</label> ";
}
return $str;
}
{
global $g5, $w, $config, $board;
$ca_name = array_map('trim', explode(',', $ca_lang));
$arr = array_map('trim', explode('|', $board['bo_category_list']));
$str = '';
for ($i=0; $i<count($arr); $i++)
{
if (trim($arr[$i]))
$str .= "<input type='checkbox' name='ca_name[]' value='{$arr[$i]}' id='ca_name_".$i."'";
if (in_array("{$arr[$i]}", $ca_name)) $str .= " checked='checked'";
$str .= "> <label for='ca_name_".$i."'> {$arr[$i]}</label> ";
}
return $str;
}
추천0
댓글목록
등록된 댓글이 없습니다.