Home > php教程 > PHP源码 > 显示周一到周日

显示周一到周日

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-02 09:14:18
Original
1644 people have browsed it
跳至 [1] [全屏预览]
                        <ul>
                            <?php
                            $time = time();
                            $week = date('w');
                            $week_cn=array('周日','周一','周二','周三','周四','周五','周六');
                            for($i=0;$i<7;$i++){
                                $day = $time+$i*86400;
                                ?>
                                <li <?php if($i==0){?>class="current"<?php }?> date="<?php echo date('Y-m-d',$day)?>">
                                    <span><?php echo $week_cn[($week+$i)%7]?></span>
                                    <?php echo date('m-d',$day)?>
                                </li>
                            <?php }?>
                        </ul>
Copy after login

2. [图片] QQ截图20160526145044.png    

显示周一到周日
Related labels:
source:php.cn
Statement of this Website
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
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template