---
title: "Merge ViewHelper <f:merge>"
manual: "Fluid ViewHelper Reference"
version: "14.3"
permalink: "https://docs.typo3.org/permalink/t3viewhelper:typo3fluid-fluid-merge@14.3"
source: "Global/Merge.rst"
rendered: "2026-10-01T16:43:06+00:00"
---

# Merge ViewHelper `<f:merge>` {#typo3fluid-fluid-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 {#typo3fluid-fluid-merge-arguments}

-   **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
