【php教程 百度云】PHP教程.经验技巧

时间:2013-11-26  来源:php高级应用  阅读:
for的高级运用


for的高级运用


/*
** 打印必要的说明文字
*/
print("距离星期一还有几天? ");
print("
    ");
    for($currentDate = date("U"); //定义$currentDate时间格式
    date("l", $currentDate) != "Monday"; //判断是不是当前系统时间是Monday
    $currentDate += (60 * 60 * 24))//当前时间加上1天
    {
    /*
    ** 打印时间名称
    */
    print("" . date("l", $currentDate) . " ");
    }
    print("
");
?>


 

【php教程 百度云】PHP教程.经验技巧

http://m.bbyears.com/jiaocheng/2267.html

推荐访问:
相关阅读 猜你喜欢
本类排行 本类最新