2009. 12. 16.

PHP date() 함수의 이용

일반적인 date() 함수의 이용
$S_date = date("Y-m-d");
ex) 2007-09-10

date()함수로 구해진 일자에서 2일을 빼고 싶다면?


$S_date = date("Y-m-d",strtotime(date("Y-m-d")."-2day"));
ex) 2007-09-08

0 개의 댓글:

Archive

prof

With you not around it’s a little bit more than I can stand. Don’t tell me I ran out of time If it takes the rest of my life.