editing how a field is output (changing commas to )
Just for security purposes I would wrap $commaString in check_plain() to get rid of any naughty characters or code that could come through.

And as for doing extremely simple things with PHP, you shouldn't have to worry about doing it the "Drupal way" too often. There are such things as PHP wrapper functions which are useful for keeping your code safe from PHP version quirks.

Also just to add, if the question were: "I want to format this CSV as a bulleted list." Then I would've suggested using a theme() function like the following:

print theme('item_list', array('items' =&gt; explode(",", check_plain($commaString))));


Because Drupal's theme layer is your friend and will help you to almost never write markup in your code. And I'm not aware of a theme function that converts a CSV string into a newline separated one. Item list is a good example of a theme function, so is a table theme.