你好,我使代碼轉換的天名稱爲阿拉伯語與會話和日期(「L」)打印1當切換日期爲阿拉伯語
像當日是週五,在阿拉伯語=「الجمعه」打印日
當我回聲$ nameday,他只是打印1
<?php
$nameday = date("L");
switch($nameday) {
case "Saturday":
$nameday = "ألسبت";
break;
case "Sunday":
$nameday = "الأحد";
break;
case "Monday":
$nameday = "الأثنين";
break;
case "Tuesday":
$nameday = "الثلاثاء";
break;
case "Wednesday":
$nameday = "الأربعاء";
break;
case "Thursday":
$nameday = "الخميس";
break;
case "Friday":
$nameday = "الجمعه";
break;
}
echo $nameday;
?>
大寫'L'會告訴你它是否是一個閏年:http://php.net/manual/en/function.date.php你想要'date('l')',或者小寫'L'。演示:http://codepad.org/JfSCZGsL –
date(「l」);使用小寫 – devpro