Wednesday, 15 February 2012

PHP get next wednesday of a specific date -



PHP get next wednesday of a specific date -

$wed_date = strtotime('next wednesday'); $my_time = $some_unix_time; //how line below work $the_next_wednesday_from_my_time = "";

e.g want know unix time, next quarta-feira when, how accomplish :)

thanks helping

try this:

$currentdate = time(); $nextwednesday = strtotime('next wednesday', $currentdate); echo date('d-m-y', $nextwednesday);

strtotime takes sec parameter starting time. see https://php.net/manual/ro/function.strtotime.php

php

No comments:

Post a Comment