diff --git a/examples/save_to_file_without_header_row.php b/examples/save_to_file_without_header_row.php new file mode 100644 index 0000000..0b2ff44 --- /dev/null +++ b/examples/save_to_file_without_header_row.php @@ -0,0 +1,27 @@ +heading = false; + +# Specify which columns to write, and in which order. +# We won't output the 'Awesome' column this time. +$csv->titles = ['Age', 'Name']; + +# Data to write: +$csv->data = [ + 0 => ['Name' => 'Anne', 'Age' => 45, 'Awesome' => true], + 1 => ['Name' => 'John', 'Age' => 44, 'Awesome' => false], +]; + +# Then we save the file to the file system: +$csv->save('people.csv');