Hi i convert an collections of string comma separated 0 1 5, 2 3 15, 4 18 20 into an array using this functions as follow:
$openHrs = explode(",", $openHrs['open_hours']);
The end result are as follow:
Array ( [0] => 0 1 5 [1] => 2 3 15 [2] => 4 18 20 )
In this array 0 1 5 means Mon 1 am 5 am and 4 18 20 means Thur 6 pm 8 pm, so first digit represent weekday rest 2 digits represent hours in 24hrs format, now how can i output the existing array into this format?
Array ( [0] => Mon 1 am 5 am [1] => Tue 3 am 3 pm [2] => Thur 6 pm 8 pm )
Thanks