0
0

PHP dateをMysqlやPostgreSQLのdateタイプデータから曜日を取得する。

Posted at

サイトにスケジュール等を日付別に表示する際、日付の横に(日)の様に曜日名を表示する際の記述例です。

$youbi = array("日", "月", "火", "水", "木", "金", "土");
echo "(".$youbi[date('w', strtotime($row['<database fieldname>']))].")";

参考になればと思います。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0