1
我用下面的代码在我的网站上显示的博客文章的时间:如何将php中的时间转换为用户友好的文本?
strftime('%B %e, %Y',strtotime($row->date))
它返回以下字符串:
November 7, 2011
我如何能适应上述代码显示(.. st,..nd,..rd,..th)在数字的末尾。因此,我可以显示日期为:
November 7th, 2011
等