CH7--数组,p128,练习二
2016-12-19 16:47
141 查看
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf8"> <title>应用explode()函数添加多选题</title> <style type="text/css"> <!-- .style1 {color: #FF0000} --> </style> </head> <body> <table width="400" border="0" cellspacing="0" cellpadding="0"> <tr> <td><form name="form1" method="post" action=""> <table width="400" border="1" cellpadding="0" cellspacing="1" bordercolor="#FF9900" bgcolor="#CCFF66"> <tr align="center"> <td height="36">多选题目:</td> <td height="36" align="left"><p> <input name="title" type="text" id="title" size="32"> </p></td> <td height="36"> </td> </tr> <tr align="center"> <td width="98" height="120">添加多选题:</td> <td width="223" height="120"><p> <textarea name="content" cols="30" rows="5" id="content"></textarea> <br> <span class="style1">注意:每个选项间用*分隔符</span></p></td> <td width="61" height="120"><input type="Submit" name="Submit" value="提交"></td> </tr> </table> </form></td> </tr> <tr> <td> <?php if(@$_POST[Submit]!=""){ ?> <table width="400" border="1" cellpadding="0" cellspacing="1" bordercolor="#FF9900" bgcolor="#CCFF66"> <tr align="center"> <td width="98" height="30"><?php echo @$_POST[title];?></td> <td width="223" height="30"> <?php $content=@$_POST[content]; $data=explode("*",$content); while(list($name,$value)=each($data)){ echo '<input type="checkbox" name="checkbox" value="checkbox">'; echo $value."\n"; } ?> </td> <td width="61" height="30"> </td> </tr> </table></td> </tr> </table> <?php } ?> <p> </p> </body> </html>
相关文章推荐
- 第05章 数组 04 练习2
- 个人练习数据结构之--------------关于线性数据的有序数组以及之上的二分法查找、不同排序方法的学习
- 第05章 数组 10 练习8
- java数组4种排序方法练习
- for循环的小练习之产生不重复数字的整型数组
- 【OJ练习】把数组排成最小的数
- 数组练习:各种数组方法的使用&&事件练习:封装兼容性添加、删除事件的函数&&星级评分系统
- 编程练习2——02—将整数转换为相应的一个字符数组
- 【编程练习】求数组和最大的子数组
- 简单数组练习(for+if)
- 数组、函数练习
- 4.3.5 数组深入练习
- 二维数组,指针数组,指向指针数组的指针的应用练习〈一〉
- 小女也爱c#(3)--俄罗斯方块练习数组
- 黑马程序员——Java练习笔记——数组
- 专项练习:数组和字符串(一)
- delphi中记录数组的使用练习
- 《黑马程序员》java笔记->基本数据类型包装类及自动拆箱装箱原理,数组排序练习字符串切割
- 类模板的练习:数组类模板
- 暑假集训日记--8.16--练习赛题+树状数组