fputcsv

PHP 5 >= 5.1.0, PHP 7, PHP 8
fputcsv - Format line as CSV and write to file pointer
Manual
Code Examples

Example #1 fputcsv example

Result: aaa,bbb,ccc,dddd 123,456,789 """aaa""","""bbb"""
PHP Version: