A CSV file is a simple enough format, it shouldn't be too hard to read rows from a MySQL table and then write them out all nicely quoted and comma'd. Even easier than putting them in an HTML table I'd've thought. What's the bit you're having trouble with?