Skip to content
Advertisement

how to remove a parent index array and change it to object in laravel

I have an array like below :

JavaScript

What I want to do is simply to remote the parent 2021-08-08 items because I have the date inside the array already . Now, what I have tried so far is :

JavaScript

But it gives me error of undefined index[0] . what I want this array to look like is like below :

JavaScript

Advertisement

Answer

Won’t just array_values() do?

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