Sign up to request clarification or add additional context in comments.
Comments
1
It depends on how you have the values, you have already as an array, then array_merge() is ok, but if you loop in something and you get a value at a time then the second option is ok.
Depends on how you generate the second array. If the second array you wish to append comes from the output of another function, the better choice is array_merge().