CopyPastor

Detecting plagiarism made easy.

Score: -1; Reported for: Open both answers

Possible Plagiarism

Plagiarized on 2017-02-10
by Faisal

Original Post

Original - Posted on 2010-04-09
by Sam152



            
Present in both answers; Present only in the new answer; Present only in the old answer;

You will have to look into [strtotime()][1]. I'd imagine your final code would look something like this:
$dateVariable = strtotime('2010-04-09');//your date variable goes here $date_after_7_days = date('Y-m-d', strtotime('+7 days', $dateVariable)); echo $date_after_7_days;
[Live Demo][2]

[1]: http://php.net/manual/en/function.strtotime.php [2]: https://eval.in/734924
You will have to look into [strtotime()][1]. I'd imagine your final code would look something like this:
$future_date = "April 16,2010"; $seconds = strtotime($future_date) - time(); $days = $seconds /(60 * 60* 24); echo $days; //Returns "6.0212962962963"
[1]: http://php.net/manual/en/function.strtotime.php

        
Present in both answers; Present only in the new answer; Present only in the old answer;