How to split a string into an array with Twig
Twig provides many filters that mimic the basic features of PHP that are easy to understand for front-end developers. One of those filters is a split filter that allows you to split a delimited string by a single character, returning a repeating array. You can limit the length of the result array providing it as…