explode Modifier

Breaks a string into an array of strings split on a given delimiter.

places: Scotland, England, Switzerland, Italy
{{ places | explode(',') | ul }}
{!! Statamic::modify($places)->explode(',')->ul() !!}
<ul>
<li>Scotland</li>
<li>England</li>
<li>Switzerland</li>
<li>Italy</li>
</ul>
Docs feedback

Submit improvements, related content, or suggestions through Github.

Betterify this page →