I'm trying to create a calendar in php. I need to get the weekday (sunday, monday, etc) of the first day of the month. My code so far is:
<?php
$current_month = date("n");
$current_year = date("Y");
$first_day_of_month = new DateTime();
$first_day_of_month -> setDate($current_year,$current_month,1);
?>
I'm stuck on how to get the weekday of the set date (the first of the month). Any suggestions?