WP-CLI

A command line interface for WordPress

Docs » Internal API » Misc

WP_CLI\Utils\write_csv()

Write data as CSV to a given file.


Usage

WP_CLI\Utils\write_csv( $fd, $rows, $headers = array() )
$fd (resource) File descriptor
$rows (array) Array of rows to output
$headers (array) List of CSV columns (optional)

Internal API documentation is generated from the WP-CLI codebase on every release. To suggest improvements, please submit a pull request.