send email using php

Day number of week from date or day in php

In one of the previous posts I described how to get day from date in PHP. The same function can be used to find the day numberĀ of the week. In this post I have given examples of how to find “day number of week” from both date and day name.

For example:

20/8/2015 is Thursday, which is 4th day of the week.

 

Find current day number of week

 

Find day number of week from date

 

Find day number of week from day

Other than date, day number of week can also be found by the “date name”.

 

 

Useful Links:

day of the week to day number

Finding the number of the day in a week in PHP from a date