I have function for export data into csv file :
$products = //databse query
foreach($products as $key => $product) {
$products[$key]['example'] = 'example';
.
.
.
}
$csv = new parseCSV();
$csv->output ('products.csv', $products, $labels, $delimiter);
Problem is with memory limit, when user hase many records.
How can I deal with memory limit without increase it ?
You should write your csv file line by line, take a look at example here :
http://php.net/manual/en/function.fputcsv.php