<?php $firstOfMonth = strtotime(date("Y-m-01", strtotime("2017-07-17"))); //Apply above formula. echo intval(date("W", $date)) - intval(date("W", $firstOfMonth)) + 1;
You have javascript disabled. You will not be able to edit any code.