phpで時間を指定してコンテンツを表示させる
サイトで期間限定で何かを表示させたいとき
$YmdHi = date("YmdHi");
//時間指定
$HTML['info'] = "";
if($YmdHi >= 2016xxxxxxxx and $YmdHi <= 2016xxxxxxxx) {
$HTML['info'] = <<< HTML
<div id="info">【 お知らせ 】いつからいつまでhogehoge~</div>
HTML;
}
//header
$html['header'] = <<<HTML
{$HTML['info']}
<header>
.
.
.
.
.
HTML;
こんなかんじ