Best solution would be:
$monday = date( 'Y-m-d', strtotime( 'monday this week' ) );
$friday = date( 'Y-m-d', strtotime( 'friday this week' ) );
Related Contents:
- Convert one date format into another in PHP
- Converting string to Date and DateTime
- Correctly determine if date string is a valid date in that format
- Compare given date with today
- PHP DateTime::modify adding and subtracting months
- Adding one day to a date
- Add ‘x’ number of hours to date
- The first day of the current month in php using date_modify as DateTime object
- How to list all months between two dates
- How can I check if the current date/time is past a set date/time?
- How do I find the hour difference between two dates in PHP?
- Simplest way to increment a date in PHP?
- Find Month difference in php? [duplicate]
- How to generate random date between two dates using php?
- Set timezone in PHP and MySQL
- Date in a URL dd/mm/yyyy
- Calculate total seconds in PHP DateInterval
- How to convert ISO8601 to Date format in php
- How do you explain the result for a new \DateTime(‘0000-00-00 00:00:00’)?
- How do I get the current date and time in PHP?
- How to store repeating dates keeping in mind Daylight Savings Time
- How do I compare two DateTime objects in PHP 5.2.8?
- Timezone conversion in php
- PHP mysql insert date format
- How to check if a date is in a given range?
- PHP get number of week for month
- Accessing dates in PHP beyond 2038
- Date Difference in php on days? [duplicate]
- Convert number to month name in PHP
- PHP convert date format dd/mm/yyyy => yyyy-mm-dd [duplicate]
- Elegant way to get the count of months between two dates?
- Get interval seconds between two datetime in PHP?
- Round minute down to nearest quarter hour
- Object of class DateTime could not be converted to string
- How to count days between two dates in PHP?
- Get week number (in the year) from a date PHP
- Print time in 15-minute increments between two times in the same day
- php convert datetime to UTC
- get next and previous day with PHP
- How to update timezonedb in PHP (updating timezones info)?
- Setting the Timezone for PHP in the php.ini file
- PHP get start and end date of a week by weeknumber
- How to reformat date in PHP?
- how to convert php date formats to GMT and vice versa?
- NOW() function in PHP
- PHP DateTime() class, change first day of the week to Monday
- change the date format in laravel view page [duplicate]
- php: setting a timezone by UTC offset
- adding 30 minutes to datetime php/mysql
- How to convert between time zones in PHP using the DateTime class?