This question already has answers here: What's the difference between array_merge and array + array? (9 answers) Closed 4 years ago .

When I use array_merge() with associative arrays I get what I want, but when I use them with numerical key arrays the keys get changed.

With + the keys are preserved but it doesn't work with associative arrays.

I don't understand how this works, can anybody explain it to me?