21. PHP Array Functions-8 | array_merge and array_merge_recursive | ATIBlog

preview_player
Показать описание
PHP array functions tutorial in hindi . PHP tutorial in hindi.

array array_merge ( array $array1 [, array $array2 [, array $array3...]] );
array array_merge_recursive ( array $array1 [, array $array2...] )

1. array_merge()
This function is used to merge two or more arrays.
Here the values of one are appended to the end of the previous one.
If it finds matching key then, it replaces the value of the first with the second.
First parameter array is required, but other parameter arrays are optional.
Returns the merged array.

2. array_merge_recursive()
This function is same as array_merge, It appends the array elements to the end of previous ones.
If it finds the matching key then it does not replaces the first value with another. It just makes an array of those values of the same key.
Returns an merged array.

Рекомендации по теме
welcome to shbcf.ru