I am using ACF taxinomy sub field. I am searching for a way to display multiple categorys from this field. The code I am using display all categories but the word touch each other, and don't separate. How to make those category words appear separately ?
<?php
$term = get_sub_field('categories');
if( $term ) {
foreach($term as $t) {
$t = get_category($t);
echo $t->name;
}
}
?>