When using the json decode function in a json, I'm having a problem. When the numbering is perfectly in order (0,1,2,3 ...) it is classified as arra:
[2016-08-01] => Array
(
[0] => 07:00:00
[1] => 07:20:00
[2] => 07:40:00
[3] => 08:00:00
[4] => 08:20:00
[5] => 08:40:00
[6] => 09:00:00
[7] => 09:20:00
[8] => 09:40:00
[9] => 10:00:00
[10] => 10:20:00
[11] => 10:40:00
[12] => 11:00:00
)
However, when I need to remove some schedules it automatically becomes an object (I removed the element of index 9 and 10)
[2016-07-25] => stdClass Object
(
[0] => 07:00:00
[1] => 07:20:00
[2] => 07:40:00
[3] => 08:00:00
[4] => 08:20:00
[5] => 08:40:00
[6] => 09:00:00
[7] => 09:20:00
[8] => 09:40:00
[11] => 10:40:00
[12] => 11:00:00
)
I would like to know how to prevent this from occurring, or if not, pass all my data to object, or all data to array.