$wday に入っている (0->日曜, 1->月曜, 2->火曜 ...) を Sun, Mon, Tue ... に変換したい $wday = ("Sun", "Mon", "Tue", "Wed", "Thu, "Fri", "Sat")[$wday]; 予め配列に設定してあるなら @wday_name = ("Sun", "Mon", "Tue", "Wed", "Thu, "Fri", "Sat"); $wday = $wday_name[$wday];