Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

how to count how many sundays in month?

Answer Posted / ashish kumar

/* $day = 0 for counting sunday. If you want to count
any other day in a month then set the $day accordingly.
For example $day = 3 for wednesday
*/
$day = 0;
$temp = date('j') - date('w') + $day ;
$count_day_in_a_month = (int)($temp/7) + (int)((date('t') -
$temp)/7) + 1;

Is This Answer Correct ?    13 Yes 10 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is php mainly used for?

927


How values in arrays are indexed?

1011


Is empty array php?

965


What is php data type?

926


How to include variables in double-quoted strings?

929


Which will start a session?

967


What are computer variables?

892


What is PHP's configuration file called?

1143


What is the main difference between php 4 and php 5?

935


What's the output of the ucwords function in this example?

986


Where are php configuration settings stored?

965


What is php ci?

941


Does wordpress run on php 7?

912


How many types of errors in php?

1003


Explain me the difference between include and require?

863