Home >Backend Development >PHP Tutorial >php学习笔记之动态生成一组单选按钮

php学习笔记之动态生成一组单选按钮

WBOY
WBOYOriginal
2016-06-23 13:33:36753browse

<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>动态生成一组单选按钮</title> 
$label) { if ($i == $col) //一行结束 { $html .= ''; $i = 0; } if ( $i % $col == 0) //一行开始 { $html .= ''; } if ($s == $len && $i '; } else { $html .= ''; ++$i; ++$s; } return $html; } $options = array("100", "400m", "1500m", "跳高", "立定跳远", "三级跳远", "铅球", "实心球", "三项全能", "接力赛"); $default = "2"; $col = 3; //表格的列数 $html = GenerateRadioGroup("RadioEvent", $options, $col, $default); echo $html; ?>
'; } $value = htmlentities($value); $html .= ''; $html .= $label; $html .= '

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:php随记3Next article:简单的php验证码生成