I have a pretty big PHP Array: Lets say 2000 lines and 50 columns that all contain Strings.
I want to create a script that converts this array into a CSV file. With smaller arrays I did this by serializing the array and sending it inside a form in a hidden
<input name='csvarray' type='text' hidden value='<?php echo (serialize($csvArray)); ?>'>
with the form I am calling a php script through POST where I unserialize the array and create the .csv file.
The problem is that with bigger arrays I am running in some sort of Server problem because the input value (the serialized array of strings) gets bigger than 1.000.000 characters and the page crashes.
Any a bit more elegant way how to create a csv file on button click?
Thanks for any feedback!