CSV theme module

Events happening in the community are now at Drupal community events on www.drupal.org.
maciej.zgadzaj's picture

I just put together a small module for formatting table arrays as CSV file content. Generally, I needed a feature for outputting the same data either as table (using built-it theme_table() function) or as CSV.

The result is new theme_csv() function, used in exactly the same way and with the same params as theme_table(), plus two additional optional params for user-defined delimiter and enclosure:

theme_csv($header, $rows, $attributes = array(), $caption = NULL, $delimiter = ',', $enclosure = '"')

Uploaded to sandbox project here: http://drupal.org/sandbox/maciej.zgadzaj/1185828

What do you think?

Contributed Module Ideas

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: