Need help about date in php

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hi expert!.

i need help to calculate a date, how much the remain of day?, 
i try subtract(-) between $expire_date and date now. so, i subtract a year first,
and then month, at last a day. like this

$result = $expire_date - $date_now

this is the code:


$expire_date = june, 15 2008(as parameter in function).

function get_remain_day($expire_date) {
  ....
}

the result from function that i want is : 
example now is May, 31 2008

eg: the result should "15 day more".

thanks.


       

[Non-text portions of this message have been removed]


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux