如何显示 - 03d 01h 10m在php? [英] how to display - 03d 01h 10m in php?
本文介绍了如何显示 - 03d 01h 10m在php?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用时间戳,需要以格式 03d 01h 10m
打印日期。我不能使用 date()
格式化。如何做到这一点,这样的日子之后,我有一个 d
,小时后 m
m
?
I am using timestamps and need to print the date in the format 03d 01h 10m
. I could not do it using the date()
formatting. How can I do it so that after the days I have a d
, after the hours m
, and after the minutes m
?
推荐答案
手册:示例#2转义date()中的字符:
Manual: Example #2 Escaping characters in date():
<?php
// prints something like: Wednesday the 15th
echo date('l \t\h\e jS');
?>
这篇关于如何显示 - 03d 01h 10m在php?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文