I have an array that is generated based on data retrieved from database and looks like this:
Array ( [0] => ["Tablet","Budget"] [1] => ["Phone","VPN"] )
or
Array ( [0] => ["Tablet","Budget", "Cloud"] [1] => ["Phone","VPN"] )
or
Array ( [0] => ["Tablet","Budget"] [1] => ["Phone","VPN", "POP"] )
Desired result would be (based on array examples from above):
Array ( [0] => ["Tablet", "Budget","Phone", "VPN"] )
or
Array ( [0] => ["Tablet", "Budget", "Cloud", "Phone", "VPN"] )
or
Array ( [0] => ["Tablet", "Budget", "Cloud", "Phone", "VPN", "POP"] )
I tried with
call_user_func_array('array_merge', $myarray);
and
$test = array_merge(...$myarray)
but i can't make it work, the values are not merged.
How can i do it?
PHP 7.3.1
Thank you