Since version PHP > 5.4 , the '+' is no longer can be use to combine 2 numeric key array. any alternative to combine 2 numeric key array without change the key? for example
myarray1 = [0 => '-'];
myarray2 = [8 => 'CUACA BURUK' ,
3 => 'JALAN SESAK' ,
2 => 'KEMALANGAN' ,
7 => 'KENDERAAN ROSAK' ,
6 => 'KURSUS/BENGKEL/SEMINAR' ,
9 => 'LAIN-LAIN' ,
4 => 'LAWATAN TAPAK/KERJA LUAR' ,
5 => 'MESYUARAT',
];
I want to create a combo box, the second array is an array that I get from my database and want to and additional blank option to user. I want retain the key and the element when merge the 2 array. If I using the array_merge, it will change the key.