Jump to content

count multidimensional arrays


rvdb86

Recommended Posts

hey, I have a multidimensional array that stores the days between two dates:

$lowSeasonDays[$LS++]["Month"] = date("m", strtotime($startDate));
		$lowSeasonDays[$LS++]["Day"] = date("d", strtotime($startDate));

 

How do I count how many values there are for a specific month. For example if the start date is 2009-01-28 and the end date is 2009-02-05 I want to be able to count and print how many days there are in January and how many there are in February.

 

I would very much appreciate any suggestions!

 

Link to comment
https://forums.phpfreaks.com/topic/177905-count-multidimensional-arrays/
Share on other sites

i have search google and tried all weird and strange for loops with ugly if statments and still have not managed to solve my problem.

 

It would be great if someone knew how to count the number of values there are for arrayName["month"] = "1" for example.

 

TIA!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.