I have two arrays by array_merge() that look like this:
Array(
[1] => Array(
[date] => 2018-09-25
[size_one] => 'XL'
[name_one] => 'Shoes'
)
[2] => Array(
[date] => 2018-09-25
[size_two] => 'L'
[name_two] => 'Shirt'
)
[3] => Array(
[date] => 2018-09-26
[size_two] => 'L'
[name_two] => 'Shirt'
)
)
If same date value, I need as a result something like the following:
Array(
[1] => Array(
[date] => 2018-09-25
[size_one] => 'XL'
[name_one] => 'Shoes'
[size_two] => 'L'
[name_two] => 'Shirt'
)
[2] => Array(
[date] => 2018-09-26
[size_two] => 'L'
[name_two] => 'Shirt'
)
)
want to be able to put these into an array for laravel, Can someone show me the proper way to merge these arrays?