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

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

WBOY
Release: 2016-06-23 13:33:36
Original
746 people have browsed it

<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>动态生成一组单选按钮</title> 
Copy after login
$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 .= '

source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template