【发布时间】:2022-01-03 22:58:14
【问题描述】:
我想更改以下代码中的日期格式:
#search for all event start dates
$starts = $sxml->xpath('//event/startdate');
#get the unique start dates of these event
$dates = array_unique($starts);
foreach($dates as $date) {
echo "<li class='header'><h1>{$date}</h1></li>" ."\n";
目前,它从 XML 提要中提取为 25/11/2021,我想将其显示为 2021 年 11 月 25 日星期四 - 可能是多个变量。但是,date() 不起作用。
感谢任何帮助!
【问题讨论】: