Need to find out if it's the second monday in the month, fourth tuesday, etc.

Hi,

So basically, I need to find out which day of the week it is, and then how many times that weekday has appeared this month (is it the first thursday, second monday, etc.).

First, I'll get a date:

PHP Code:

```
$getdate = date("Y\-m\-d");
```

Next I need to find out what day of the week it is:

PHP Code:

```
$date_day = date('N', strtotime($getdate));
```

Next, and the part I'm struggling with, I need to find out which instance this day is in the month. Is it the first thursday? Second monday?

I thought I'd found something that worked, but it just gave me what week it was, which is different. Like for today, it would give me the fifth week, but it's only the fourth wednesday.

I'd really appreciate some help here. I keep finding ways to find out which week it is, but I can't find anything on which which instance a specific day of the week it is.