PHP/format()

解説 日付を文字列の形で取得する関数
sample1
sample1code
$s1Date = new DateTime();
$s1Week = array("日", "月", "火", "水", "木", "金", "土");
$w = (int)$s1Date->format('w');
echo $s1Week[$w];