I want to separate iteration results by comma, but it's not an array. I want to do it in views, so code shouldn't be long.

```
<?php foreach ($roles as $role): ?>
    <?php echo $role->title; ?>
<?php endforeach; ?>

```

Result object implements Countable, Iterator, SeekableIterator, ArrayAccess.