$field->split()
Splits the field content into an array
$field->split($separator = ','):
Parameters
Name | Type | Default | Description |
---|---|---|---|
$separator |
mixed |
',' |
Example
<h2>Tags</h2>
<ul>
<?php foreach ($page->tags()->split(',') as $tag): ?>
<li><?= $tag ?></li>
<?php endforeach ?>
</ul>