2010-08-07 date 関数 PHP 時間帯で文字などを変えたい場合 <?php if(date("h")>= 18) { print "goodnight";} elseif(date("h")>= 11) { print "hello";} elseif(date("h")>= 6) { print "goodmorning";} else{ print "深夜です"; } ?>