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
$the_date = '2017-05-23';
$the_day_of_week = date("w",strtotime($the_date)); //sunday is 0
$first_day_of_week = date("Y-m-d",strtotime( $the_date )-60*60*24*($the_day_of_week)+60*60*24*1 );
$last_day_of_week = date("Y-m-d",strtotime($first_day_of_week)+60*60*24*4 );
echo $first_day_of_week;
echo "~";
echo $last_day_of_week;