본문 바로가기

PHP/새로운문법

시간관련 함수

<!DOCTYPE html>

<html lang="ko">

<head>

<meta charset="UTF-8">

</head>

<body>

<?php

$d=strtotime("tomorrow");

echo date("Y-m-d h:i:sa", $d) . "<br>";


$d=strtotime("next Saturday");

echo date("Y-m-d h:i:sa", $d) . "<br>";


$d=strtotime("+3 Months");

echo date("Y-m-d h:i:s", $d) . "<br>";

?>


</body>

</html>



'PHP > 새로운문법' 카테고리의 다른 글

예외처리(try ~ catch)  (0) 2017.11.09
간단한 로그인예제(Session)  (0) 2017.11.09
PDO 데이터 베이스 접속  (0) 2017.11.09
쿠키  (0) 2017.11.08
난수생성  (0) 2017.11.08