<?php const ARR1 = ['apple' =>1, 'buleberry' =>1, 'pear'=>1 ]; const ARR2 = ['egg' => 1, 'milk' => 1, 'cheese' =>1 ]; const ARR3 = ['cabbage' => 1, 'onion' => 1, 'roquette' =>1 ]; $arr = ARR1 + ARR2 + ARR3; print_r($arr);
Array ( [apple] => 1 [buleberry] => 1 [pear] => 1 [egg] => 1 [milk] => 1 [cheese] => 1 [cabbage] => 1 [onion] => 1 [roquette] => 1 )