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
精彩评论