php 3 days after

144

php 3 days after -

$Today=date('y:m:d');
  
// Declare a date 
$date = "2019-05-10"; 
  
//if already have time  then use this  =============
echo date('Y-m-d', strtotime($Today. ' + 10 days')); 

//if already have time  then use this  =============

// add 3 days to date
$NewDate=Date('y:m:d', strtotime('+3 days'));

// subtract 3 days from date
$NewDate=Date('y:m:d', strtotime('-3 days'));

// PHP returns last sunday's date
$NewDate=Date('y:m:d', strtotime('Last Sunday'));

// One week from last sunday
$NewDate=Date('y:m:d', strtotime('+7 days Last Sunday'));

php date + 30 days -

echo date('d/m/Y',strtotime('+30 days',strtotime(str_replace('/', '-', '05/06/2016')))) . PHP_EOL;

Comments

Submit
0 Comments