开发者

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

开发者 https://www.devze.com 2023-02-16 03:54 出处:网络
what is the easiest way of displaying string 2011-01-27-123907 instead of 20110127123907 without writing开发者_Go百科 special function for it?<?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

精彩评论

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