Skip to content
Advertisement

how to stop adding more data in array in foreach loop

i looping 2 array a date and the data

JavaScript

i am expecting this result

JavaScript

What actually getting

Adding old $r to results array

How to fix it i am trying to break it but can’t figure it out

Advertisement

Answer

I have some untested code, as I do not have your data but I think this code below should work, you may need to modify some code as needed.

JavaScript
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement