I have this Open Days array of objects for my project.
stdClass Object
(
[Mon] => stdClass Object
(
[DAY_NAME] => Mon
)
[Tue] => stdClass Object
(
[DAY_NAME] => Tue
)
[Wed] => stdClass Object
(
[DAY_NAME] => Wed
)
[Sat] => stdClass Object
(
[DAY_NAME] => Sat
)
[Sun] => stdClass Object
(
[DAY_NAME] => Sun
[SPECIAL_START_TIME] => 12:00 am
[SPECIAL_END_TIME] => 08:54 pm
)
)
So, when I need to print the from-open-day, I take the first element of the array, and the to-open-day, I take the end element of the array.
But in between, Thursday and Friday are closed.
The resultant view that I need is
Mon-Wed, Sat - #some-time-here
Sun - #Some-time-here
I am very much confused as to how should I approach this