php get current week start and end date code example
Example: week starting date and end date in php
<?php$week=29;$year=2017;function getStartAndEndDate($week, $year) { $dateTime = new DateTime(); $dateTime->setISODate($year, $week); $result['start_date'] = $dateTime->format('d-M-Y'); $dateTime->modify('+6 days'); $result['end_date'] = $dateTime->format('d-M-Y'); return $result;}$dates=getStartAndEndDate($week,$year);print_r($dates);?>