Creating a CSV File Using PHP
PHP has defined functions for creating CSV files. Using these functions instead of libraries like PhpExcel has several advantages. They consume fewer resources and are therefore faster. First, let's create the function that will create our CSV file. function array_to_csv_function($array, $filename = “export.csv”, $delimiter=”;”) { // Instead of opening a temp file, we're using memory. $f = fopen('php://memory', 'w'); // […]
