I have a list that I am iterating through presently as:
<code>
<?php
foreach ( $node->field_artist as $item) {
print $item['view']. ' ';
}
?>
</code>
It outputs a straight up list. Say the items in the list are
Adam
John
Ben
Steve
I would like to output
Adam, John, Ben and Steve
or if it's just Adam , output:
Adam
or Adam and John, output:
Adam and John
or if it's
Adam
John
Ben, output:
Adam, John and Ben
Thanks for any help!