array_replace

PHP 5 >= 5.3.0, PHP 7, PHP 8
array_replace - Replaces elements from passed arrays into the first array

Example #1 array_replace example

Result: Array ( [0] => grape [1] => banana [2] => apple [3] => raspberry [4] => cherry )
PHP Version:


Example #2 of array_replace

PHP Version:


Function array_replace:

Arrays Functions

Most used PHP functions