简介:这是PHP教程.经验技巧的详细页面,介绍了和php,有关的知识、技巧、经验,和一些php源码等。
class='pingjiaF' frameborder='0' src='http://biancheng.dnbcw.info/pingjia.php?id=326949' scrolling='no'>
for的高级运用
<HTML>
<HEAD>
<TITLE>for的高级运用</TITLE>
</HEAD>
<BODY>
<?
/*
** 打印必要的说明文字
*/
print("<B>距离星期一还有几天?</B>\n");
print("<OL>\n");
for($currentDate = date("U"); //定义$currentDate时间格式
date("l", $currentDate) != "Monday"; //判断是不是当前系统时间是Monday
$currentDate += (60 * 60 * 24))//当前时间加上1天
{
/*
** 打印时间名称
*/
print("<LI>" . date("l", $currentDate) . "\n");
}
print("</OL>\n");
?>
</BODY>
</HTML>
http://biancheng.dnbcw.info/php/326949.html pageNo:13