开发者

how to display 2011-01-27-123907 instead of 20110127123907 (php)

what is the easiest way of

displaying string 2011-01-27-123907 instead of 20110127123907

without writing开发者_Go百科 special function for it?


<?php
echo date('Y-m-d-His',strtotime('20110127123907')); // Output: 2011-01-27-123907
?>


$d = date('Y-m-d-His')

For more formatting tips, check the manual

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜