How does php determine time continuity? $ Time = array ('2017-10-25 ', '2017-10-27', '2017-11-01 '); and so on, how can we determine whether the time is continuous ?, Strtotime ('2017-10-25 '); then judge ., How does mktime () strtotimed php determine time continuity?
$ Time = array ('2017-10-25 ', '2017-10-27', '2017-11-01 '); and so on, how can we determine whether the time is continuous?
------ Solution --------------------
Strtotime ('2017-10-25 '); then judge.
------ Solution --------------------
Mktime () strtotime date can be researched by yourself.
------ Solution --------------------
Whether the adjacent two are converted to timestamp minus is the timestamp of one day (if one day is continuous)
------ Solution --------------------
Is the entire array time continuous or partially continuous?
The entire array is continuous:
PHP code
------ Solution --------------------
I posted my method in another post just now.
It is calculated based on an incremental day of time:
PHP code
$a = array('2011-10-30','2011-10-31','2011-11-01');$flag = true;for($i=0;$i