这篇文章主要介绍了PHP中余数、取余的妙用,这个是在WEB开发中一个经常使用的小技巧,不管是在表格、ul、li或者是换行等HTML处理中,需要隔几行换行,隔几行加入ul
$value){
$key=$key+1;
if($key%2==1){echo '
';}
?>
';}
};
?>
second_one
$value){
$key=$key;
if($key%3==0){echo '
';}
?>
';}
};
?>
大家可以运行以后查看结果并分析其巧妙之处~
,
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