<? if(!$time) $time = time(); $week = date("w", $time); if(!$sunday) $sunday = mktime(0, 0, 0, date("m"), date("d") - $week, date("Y")); for ($L = 0, $day = $sunday; $L < 7; $L++, $day+= 86400) { echo date("Y-m-d (D)", $day) ."<BR>"; } ?> <? $ytime = $sunday - 604800; $ttime = $sunday + 604800; ?> <a href="<?=$PHP_SELF?>?sunday=<?=$ytime?>">[이전]</a> <a href="<?=$PHP_SELF?>?sunday=<?=$ttime?>">[다음]</a> 그 주의 요일 값 구할때.. strtotime() <?php $now=($_REQUEST[now])?$_REQUEST[now]:time(); $sun=strtotime("last Sunday", $now); $sat=strtotime("this Saturday", $now); ?>