以下を使用して、特定の日と特定の時間にのみ div を表示していますが、正しく機能していません。時間を認識しているように見えるだけで(そして、必要なときに正しく表示されます)、日を完全に無視しています。
<?php
$current_time = date(G);
$current_day = date(l);
if ($current_day = "Thursday" && $current_time >= 19 && $current_time <= 21) { ?>
<div id="content">content here</div>
<?php } ?>
時間参照を完全に削除しても、まだ機能しません。曜日に関係なくdivを表示するだけです。
<?php
$current_day = date(l);
if ($current_day = "Thursday") { ?>
<div id="content">content here</div>
<?php } ?>
これは非常に単純なことだと確信していますが、私にはそれが見えません。
何か案は?