Gen. partnerAlgotech

PHP function array_merge()

Available in all versions of PHP

|
February 6, 2020

Available in all versions of PHP

Joins two or more fields together to create one large field.

Parameters

Parameter Data Type Default Value Note
$array1 array not Base array for merge.
$array2 array null Second merge field.
$_ array null nth merge field.

We can pass any number of arrays, but at least two.

Return values

This function returns a merged array of type array.

Additional resources

Merging large arrays in PHP, useful for merging many arrays in a loop.

Official manual

Loading comments...

Stay in the loop

Subscribe to our newsletter and get the latest cybersecurity news delivered straight to your inbox.

Your data is safe. You can unsubscribe from the newsletter at any time.