handbook/internal-api/wp-cli-utils-write-csv.md
2022-01-26 09:58:42 -06:00

2 KiB

WP_CLI\Utils\write_csv()

Write data as CSV to a given file.


Usage

WP_CLI\Utils\write_csv( $fd, $rows, $headers = [] )
$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.