[PHP-users 13290] Re: for などのループの中に ifを入れる事は可能なのでしょうか?

php-users@php.gr.jp php-users@php.gr.jp
Fri, 14 Feb 2003 22:08:01 +0900


素人なりのスクリプトですけど…。

<?php
$d[] = "01日(土):<font color=\"red\">臨時休業</font>";
$d[] = "";
$d[] = "";
$d[] = "";
$d[] = "";
$d[] = "";
$d[] = "";
$d[] = "08日(土):<font color=\"red\">休み</font>";
$d[] = "09日(日):<font color=\"red\">休み</font>";
$d[] = "11日(火):<font color=\"red\">建国記念日</font>";
$d[] = "";
$d[] = "";
$d[] = "";
$d[] = "";
$d[] = "";
$d[] = "";
$d[] = "";
$d[] = "18日(火):会長講話";
$d[] = "";
$d[] = "";
$d[] = "";
$d[] = "";
$d[] = "";
$d[] = "";
$d[] = "25日(火):社員集会";
$d[] = "";
$d[] = "";
$d[] = "";
$d[] = "";
$d[] = "";
$d[] = "";
$time = date ("d") - 1;
echo $d[$time];
?>

じゃダメなのかな・・・。

先輩のみなさんアドバイス下さいm(_ _)m