这两天学了写表单。总结于此,以备忘。
例子一(POST提交表单):
代码如下:
Chunkify Form
代码如下:
Chunkify Word
$word=$_POST['word'];
$number=$_POST['number'];
$chunks=ceil(strlen($word)/$number);
echo "The $number-letter chunks of '$word' are:
\n";
for ($i = 0;$i$chunk=substr($word,$i*$number,$number);
printf("%d: %s
\n",$i+1,$chunk);
}
?>
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