rvdb86 Posted October 16, 2009 Share Posted October 16, 2009 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 More sharing options...
rvdb86 Posted October 16, 2009 Author Share Posted October 16, 2009 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! Link to comment https://forums.phpfreaks.com/topic/177905-count-multidimensional-arrays/#findComment-938307 Share on other sites More sharing options...
teynon Posted October 16, 2009 Share Posted October 16, 2009 $cnt=count(arrayName["month"]); Link to comment https://forums.phpfreaks.com/topic/177905-count-multidimensional-arrays/#findComment-938325 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.