0
Can someone help/suggest how to return this array in following json structure. I have just started working with php array & json
4 Answers
+ 1
https://code.sololearn.com/w02uML6CpV6s/#php
0
Adam thanks for your suggestion. Its working fine for given array but on adding new items its returning a duplicate item in json for last item in array.
0
what does new array look like? it should handle just fine.
0
Please check my code. i have added an item for day 2 and in json result you can see the last item duplicated.
https://code.sololearn.com/wpt5lmdX4rOr/?ref=app