IF语句,多谢

WBOY
リリース: 2016-06-13 10:25:55
オリジナル
869 人が閲覧しました

求一个IF语句,谢谢。
求一个IF语句,$B与$D分别得不同的值

如果日期在这个期间
2012年4月9日至2012年7月7日
$b=array('b00.gif','b01.gif','b02.gif','b03.gif','b04.gif','b05.gif','b06.gif');
$d=array('d10.gif','d11.gif','d12.gif','d13.gif','d14.gif','d15.gif','d16.gif'); 
如果日期在这个期间
2012年7月8日至2012年10月6日
$b=array('b00.gif','b02.gif','b03.gif','b04.gif','b05.gif','b01.gif','b06.gif');
$d=array('d10.gif','d12.gif','d13.gif','d14.gif','d15.gif','d11.gif','d16.gif'); 
如果日期在这个期间
2012年10月7日至2013年1月5日
$b=array('b00.gif','b03.gif','b04.gif','b05.gif','b01.gif','b02.gif','b06.gif');
$d=array('d10.gif','d13.gif','d14.gif','d15.gif','d11.gif','d12.gif','d16.gif'); 

这个$a$c一直不变
$a=array('a00.gif','a01.gif','a02.gif','a03.gif','a04.gif','a05.gif','a06.gif'); 
$c=array('c10.gif','c11.gif','c12.gif','c13.gif','c14.gif','c15.gif','c16.gif');

------解决方案--------------------

PHP code
<?phpdate_default_timezone_set ("Asia/Hong_Kong");$date = "2012-08-20";switch($date){    case ($date > strtotime("2012-04-09") && $date  strtotime("2012-07-08") && $date  strtotime("2012-10-07") && $date <br><font color="#e78608">------解决方案--------------------</font><br>修改一下,<br>$date = strtotime("2012-08-20");<br>switch($date){……}<br><font color="#e78608">------解决方案--------------------</font><br>
ログイン後にコピー
探讨

引用:
修改一下,
$date = strtotime("2012-08-20");
switch($date){……}


$date = "2012-08-20"; 为什么是这个值呢?

------解决方案--------------------
PHP code
//给定的日期$geidingriqi='2012-04-10';$intime=strtotime($geidingriqi);if($intime>=strtotime('2012-04-09') and $intime<strtotime if>=strtotime('2012-07-08') and $intime<strtotime if>=strtotime('2012-10-7') and $intime<strtotime class="clear">
                 
              
              
        
            </strtotime></strtotime></strtotime>
ログイン後にコピー
関連ラベル:
ソース:php.cn
このウェブサイトの声明
この記事の内容はネチズンが自主的に寄稿したものであり、著作権は原著者に帰属します。このサイトは、それに相当する法的責任を負いません。盗作または侵害の疑いのあるコンテンツを見つけた場合は、admin@php.cn までご連絡ください。
人気のチュートリアル
詳細>
最新のダウンロード
詳細>
ウェブエフェクト
公式サイト
サイト素材
フロントエンドテンプレート
私たちについて 免責事項 Sitemap
PHP中国語ウェブサイト:福祉オンライン PHP トレーニング,PHP 学習者の迅速な成長を支援します!