Skip to content
Advertisement

formatting an array of array that contain similar key value

i have an array of arrays like this one

JavaScript

i want to obtain a result like this one

JavaScript

how can i proceed, thank you in advance

Advertisement

Answer

Something like this will help you achieve the desired result;

JavaScript

& –> PHP “&” operator

JavaScript

Try online!

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