With get the date of the first day of the week and last day of the week in php, first day Monday and the last day Friday, for example I have the date 2017-05-23 and I want to kn
My solve,
$datenow = date('Y-m-d');// date now
$mon = new DateTime($datenow);
$fri = new DateTime($datenow);
$mon->modify('Last Monday');
$fri->modify('Next Friday');
using echo
echo 'Monday: '.$mon->format('Y-m-d').'
';
echo 'Friday: '.$fri->format('Y-m-d').'
';
using var_dump()
var_dump($mon);
var_dump($fri);