---
title: "Shuffle ViewHelper <f:shuffle>"
manual: "Fluid Explained"
version: "main"
permalink: "https://docs.typo3.org/permalink/fluid:typo3fluid-fluid-shuffle"
source: "ViewHelpers/Fluid/Shuffle.rst"
rendered: "2026-09-26T08:24:58+00:00"
---

# Shuffle ViewHelper `<f:shuffle>` {#typo3fluid-fluid-shuffle}

> [!NOTE]
> This reference is part of the documentation of Fluid Standalone.
> If you are working with Fluid in TYPO3 CMS, please refer to
> [TYPO3's ViewHelper reference](https://docs.typo3.org/other/typo3/view-helper-reference/14.3/en-us/Global/Shuffle.html) instead.

The ShuffleViewHelper shuffles elements from an array.
This ViewHelper uses PHP's `shuffle()` function.

## Example {#example}

```php
<f:shuffle value="{0: '1', 1: '2', 2: '3'}" />

```

```text
{0: '2', 1: '3', 2: '1'}
```

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

**Arguments**

The following arguments are available for the shuffle ViewHelper:

-   **value**

    -   *Type:* array

    An array
