I use a dynamic calendar on my website that populates the date result into a textbox after a user makes a selection. The user will then click a SUBMIT button and POST this result to a PHP script on the server. Once this date string is POSTed to the server, how can I figure out the day of the week that this date occurs?
For example, if a user selects February 14, 2022
from the dynamic calendar, the textbox will be populated with a date string such as:
2022-02-14
The PHP script should be able to take this value, and figure out that the day of the week in this case is Monday.
Using PHP, how can I take this date string and output the day of the week?