날짜 비교하는법

PHP 2016. 9. 13. 14:35

http://www.thewordcracker.com/miscellaneous/php-%EB%82%A0%EC%A7%9C%EA%B0%80-%ED%8A%B9%EC%A0%95-%EB%82%A0%EC%A7%9C%EB%A5%BC-%EC%A7%80%EB%82%AC%EB%8A%94%EC%A7%80%EB%A5%BC-%EC%B2%B4%ED%81%AC%ED%95%98%EB%8A%94-%EB%B0%A9%EB%B2%95/

'PHP' 카테고리의 다른 글

What is the difference between single-quoted and double-quoted strings in PHP?  (0) 2016.09.30
글자 용량 체크  (0) 2016.09.28
stdobject 배열 변환  (0) 2016.05.20
stdClass 접근하기  (0) 2016.05.10
ucwords 함수  (0) 2016.04.27
Posted by 이상욱1
,

stdobject 배열 변환

PHP 2016. 5. 20. 16:25

Function to Convert stdClass Objects to Multidimensional Arrays


http://www.if-not-true-then-false.com/2009/php-tip-convert-stdclass-object-to-multidimensional-array-and-convert-multidimensional-array-to-stdclass-object/


'PHP' 카테고리의 다른 글

글자 용량 체크  (0) 2016.09.28
날짜 비교하는법  (0) 2016.09.13
stdClass 접근하기  (0) 2016.05.10
ucwords 함수  (0) 2016.04.27
현재 날짜를 초단위로 처리 관련 특정시간 초단위 처리  (0) 2016.04.18
Posted by 이상욱1
,

stdClass 접근하기

PHP 2016. 5. 10. 17:56

How to access a property of an object (stdClass Object) member/element of an array

http://stackoverflow.com/questions/21168422/how-to-access-a-property-of-an-object-stdclass-object-member-element-of-an-arr

'PHP' 카테고리의 다른 글

날짜 비교하는법  (0) 2016.09.13
stdobject 배열 변환  (0) 2016.05.20
ucwords 함수  (0) 2016.04.27
현재 날짜를 초단위로 처리 관련 특정시간 초단위 처리  (0) 2016.04.18
시간 계산하는법 date_diff  (0) 2016.04.11
Posted by 이상욱1
,

ucwords 함수

PHP 2016. 4. 27. 17:58

ucwords(string) 

string 을 맨앞자만 대문자로 바꿔준다 .

lcfirst - http://php.net/manual/kr/function.lcfirst.php

두번째 단어 대문자로 처리 

$foo 'HelloWorld';
$foo lcfirst($foo);             // helloWorld

$bar 'HELLO WORLD!';
$bar lcfirst($bar);             // hELLO WORLD!
$bar lcfirst(strtoupper($bar)); // hELLO WORLD!

'PHP' 카테고리의 다른 글

stdobject 배열 변환  (0) 2016.05.20
stdClass 접근하기  (0) 2016.05.10
현재 날짜를 초단위로 처리 관련 특정시간 초단위 처리  (0) 2016.04.18
시간 계산하는법 date_diff  (0) 2016.04.11
php 특정날짜 계산  (0) 2016.04.02
Posted by 이상욱1
,

strtotime(date('Y-m-d H:i:s'));

strtotime($sDoApiTime);

mktime(); - 현재날짜의 시간 

var_dump(date('Y-m-d H:i:s',mktime())); exit;

'PHP' 카테고리의 다른 글

stdClass 접근하기  (0) 2016.05.10
ucwords 함수  (0) 2016.04.27
시간 계산하는법 date_diff  (0) 2016.04.11
php 특정날짜 계산  (0) 2016.04.02
배열에서 중복 값 꺼내오기  (0) 2016.03.09
Posted by 이상욱1
,


$date1 = new DateTime('2009-12-20 20:12:10');

$date2 = new DateTime('2009-12-24 12:12:10');

$diff = date_diff($date1, $date2);

var_dump($diff->format('%h')); exit;


http://snowkiwi.com/php-%EC%8B%9C%EA%B0%84%EC%9D%98-%EC%B0%A8%EC%9D%B4%EB%A5%BC-%EA%B5%AC%ED%95%98%EB%8A%94-%EB%B0%A9%EB%B2%95/

'PHP' 카테고리의 다른 글

ucwords 함수  (0) 2016.04.27
현재 날짜를 초단위로 처리 관련 특정시간 초단위 처리  (0) 2016.04.18
php 특정날짜 계산  (0) 2016.04.02
배열에서 중복 값 꺼내오기  (0) 2016.03.09
php 날짜 계산 현재날짜  (0) 2016.02.12
Posted by 이상욱1
,

php 특정날짜 계산

PHP 2016. 4. 2. 17:43

php 특정날짜 구하기 


date('Y-m-d', strtotime('2016-04-29 -1 day'))

http://link2me.tistory.com/755

Posted by 이상욱1
,

http://stackoverflow.com/questions/9021238/get-an-array-of-duplicate-array-values


'PHP' 카테고리의 다른 글

시간 계산하는법 date_diff  (0) 2016.04.11
php 특정날짜 계산  (0) 2016.04.02
php 날짜 계산 현재날짜  (0) 2016.02.12
리눅스 서버에서 php info 보는 법  (0) 2016.01.21
parse_url  (0) 2016.01.13
Posted by 이상욱1
,

php 날짜 계산 현재날짜

PHP 2016. 2. 12. 10:07

//         $sCurrentYear = date("Y", mktime(0,0,0,date("m"), date("d"), date("Y")));

//         $sCurrentMonth = date("m", mktime(0,0,0,date("m"), date("d"), date("Y")));

//         $sCurrentDay = date("d", mktime(0,0,0,date("m"), date("d"), date("Y")));

//         $sCurrentDate = $sCurrentYear . '-' . $sCurrentMonth . '-' . $sCurrentDay;

        $sCurrentDate = date('Y-m-d');

        var_dump($sCurrentDate); exit;

       //delete 조건 날짜

        $sSevenDayAgo = date('Y-m-d', strtotime('-7 days'));

        var_dump($sSevenDayAgo); exit;

http://stackoverflow.com/questions/10798228/php-date-function-seven-days-previous

http://ra2kstar.tistory.com/126



현재 날짜 시간 

     $sCurrentDate = date('Y-m-d-h-i-s');

        $sCurrentDate = date('Y-m-d H:i:s');

'PHP' 카테고리의 다른 글

php 특정날짜 계산  (0) 2016.04.02
배열에서 중복 값 꺼내오기  (0) 2016.03.09
리눅스 서버에서 php info 보는 법  (0) 2016.01.21
parse_url  (0) 2016.01.13
타임스탬프 개념 strtotime()  (0) 2015.12.31
Posted by 이상욱1
,

-php info 

-php info |grep redis  - 이건  redis가  올라왔는지 보는 부분 

'PHP' 카테고리의 다른 글

배열에서 중복 값 꺼내오기  (0) 2016.03.09
php 날짜 계산 현재날짜  (0) 2016.02.12
parse_url  (0) 2016.01.13
타임스탬프 개념 strtotime()  (0) 2015.12.31
배열 내부포인터 이용  (0) 2015.12.29
Posted by 이상욱1
,