最简单的PHP显示中文星期几

最简单的PHP显示中文星期几,通过数组和date函数的结合,个人认为这种表示星期几是最简单的,代码如下:

PHP语言: 最简单的PHP显示中文星期几
<?php
$arr=array(“天”,“一”,“二”,“三”,“四”,“五”,“六”);
echo “2009-02-17是星期”.$arr[date("w",strtotime("2009-02-17"))];
?>
相关文章: 

If you enjoyed this post, please consider to leave a comment or subscribe to the feed and get future articles delivered to your feed reader.

Comments

恭喜你被点名了 我也是无奈呀~~
http://leedd.com/2009/02/hijoy_blog_call_answer/

plant in house

red sea

发表评论

(必填)

(必填)