.. This reStructured text file has been automatically generated, do not change. .. Source: https://github.com/TYPO3/Fluid/blob/main/src/ViewHelpers/ForViewHelper.php :edit-on-github-link: https://github.com/TYPO3/Fluid/edit/main/src/ViewHelpers/ForViewHelper.php :navigation-title: for .. include:: /Includes.rst.txt .. _typo3fluid-fluid-for: ======================== For ViewHelper `` ======================== Loop ViewHelper which can be used to iterate over arrays. Implements what a basic PHP ``foreach()`` does. Examples ======== Simple Loop ----------- :: {foo} Output:: 1234 Output array key ---------------- :: Output:: Iteration information --------------------- :: Output:: .. _typo3fluid-fluid-for_source: Source code =========== Go to the source code of this ViewHelper: `ForViewHelper.php (GitHub) `__. .. _typo3fluid-fluid-for_arguments: Arguments ========= The following arguments are available for ``: .. confval-menu:: :display: table :type: :default: .. _typo3fluid-fluid-for-each_argument: .. confval:: each :name: typo3fluid-fluid-for-each :type: mixed :required: true The array or \SplObjectStorage to iterated over .. _typo3fluid-fluid-for-as_argument: .. confval:: as :name: typo3fluid-fluid-for-as :type: string :required: true The name of the iteration variable .. _typo3fluid-fluid-for-key_argument: .. confval:: key :name: typo3fluid-fluid-for-key :type: string :required: false Variable to assign array key to .. _typo3fluid-fluid-for-reverse_argument: .. confval:: reverse :name: typo3fluid-fluid-for-reverse :type: boolean :required: false If TRUE, iterates in reverse .. _typo3fluid-fluid-for-iteration_argument: .. confval:: iteration :name: typo3fluid-fluid-for-iteration :type: string :required: false The name of the variable to store iteration information (index, cycle, isFirst, isLast, isEven, isOdd)