Hi there,
I am fetching some values from my blueprint and it works really well. I’m trying to split the output with ->split(’,’) but since it is an string I think I have to explode/implode it? Not sure how to do that? Can anybody help me? I want to make it comma separated.
<?php
$field = $page->blueprint()->field('category');
$categories = $page->category()->split(',');
?>
<?php foreach($categories as $category) : ?>
<?= $field['options'][$category] ?? html($category) ?>
<?php endforeach; ?>
Thanks!