I have a date given as a string. And I would like to get the first monday after this given date, again as a string.
$myDate = \"2014-08-24\"; // date given i
you can use this
<?php
$myDate = "2014-08-27";
$next_monday = date('Y-m-d', strtotime("next monday", strtotime($myDate)));
echo $next_monday;
?>
OUTPUT :
2014-09-01
Demo
You can do it using the DateTime and DateTime::modify
$date = new DateTime('2014-08-24');
$date->modify('next monday');
echo $date->format('Y-m-d') . "\n";