How to merge two arrays in PHP without array_push and the + operator
Hello everyone! I'm a beginner in PHP and I've encountered this task. I have two arrays: the first contains a basic list of products, and the second is an additional list that I get from the database. I need to add the elements of the second array to the end of the first one.
The problem is that I don't want to use array_push because it adds elements one by one, and I might have a lot of data. The + operator is also not suitable because it merges arrays, but when keys match, it keeps the values from the first array, while I need all elements of the second array to be added to the end, even if the keys match.
Here's an example of the code I have:
```php
$baseArray = ['apple', 'banana', 'orange'];
$additionalArray = ['grape', 'kiwi', 'banana'];
// How to merge these arrays so that the full