So I have an array of days and times that I need to separate into matching days coordinating with times. I have tried intersect associative and other array functions but cant seem to find one that does this. Has anyone had to of done this before?
Array
(
[Monday] => Array
(
[0] => 9:00 am
[1] => 5:00 pm
)
[Tuesday] => Array
(
[0] => 9:00 am
[1] => 5:00 pm
)
[Wednesday] => Array
(
[0] => 9:00 am
[1] => 3:00 pm
)
[Thursday] => Array
(
[0] => 9:00 am
[1] => 2:00 pm
)
[Friday] => Array
(
[0] => 9:00 am
[1] => 2:00 pm
)
[Saturday] => Array
(
[0] => 9:00 am
[1] => 5:00 pm
)
)
I need to grab all the days that have the same open and close times and put them in their own arrays like:
Array
(
[Monday] => Array
(
[0] => 9:00 am
[1] => 5:00 pm
)
[Tuesday] => Array
(
[0] => 9:00 am
[1] => 5:00 pm
)
[Saturday] => Array
(
[0] => 9:00 am
[1] => 5:00 pm
)
)
Array
(
[Wednesday] => Array
(
[0] => 9:00 am
[1] => 3:00 pm
)
)
Array{
[Thursday] => Array
(
[0] => 9:00 am
[1] => 2:00 pm
)
[Friday] => Array
(
[0] => 9:00 am
[1] => 2:00 pm
)
)