---
title: "Merge ViewHelper <f:merge>"
manual: "Fluid ViewHelper Reference"
version: "13.4"
permalink: "https://docs.typo3.org/permalink/t3viewhelper:typo3fluid-fluid-merge@13.4"
source: "Global/Merge.rst"
modified: "2026-09-17T09:07:45+00:00"
---

# Merge ViewHelper `<f:merge>`

The MergeViewHelper merges two arrays into one, optionally recursively.

It works similar to the PHP functions array_merge() and array_merge_recursive(),
depending on the value of the "recursive" argument.

Go to the source code of this ViewHelper: [MergeViewHelper.php (GitHub)](https://github.com/TYPO3/Fluid/blob/main/src/ViewHelpers/MergeViewHelper.php).

## Arguments of the `<f:merge>` ViewHelper

-   **array**

    -   *Type:* array

    The array to merge into

-   **recursive**

    -   *Type:* boolean
    -   *Default:* false

    Whether to merge arrays recursively

-   **with**

    -   *Type:* array

    Array to be merged
