Documentation · ViewHelper reference

XSD schema file | vhs master

Iterator / SplitViewHelper

Converts a string to an array with $length number of bytes per new array element. Wrapper for PHP's str_split. /

  • Tag usage example

    <v:iterator.split subject="NULL" length="123" as="NULL">
    	<!-- tag content - may be ignored! -->
    </v:iterator.split>
  • Inline usage example

    {v:iterator.split(subject: 'NULL', length: 123, as: 'NULL')}

Arguments

Argument Description Type
as

Template variable name to assign; if not specified the ViewHelper returns the variable instead.

string
length

Number of bytes per chunk in the new array

integer
subject

The string that will be split into an array

string
Required attribute

Revision history