Created
August 24, 2014 06:48
-
-
Save hiro-matsuno/98915e44bf58bd22643e to your computer and use it in GitHub Desktop.
PHPで現在日付を取得し日付文字列に変更する
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//現在日付の取得 | |
$now_date = getdate(); | |
//年月日を取得する | |
$now_year = $now_date['year']; | |
$now_month = $now_date['mon']; | |
$now_day = $now_date['mday']; | |
//日付を整形 | |
$nowDate = $now_year . "年" . $now_month . "月" . $now_day . '日'; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment