I was just wondering which is considered to be more efficient in PHP.
I need to loop through MySQL results and output it to a file using a specific format, I am interested to know whether it's more efficient to create a huge string (I'm going to be going through over 100,000 rows) and write the string to a file, or write (append) what I want to add to the file using fwrite, as I'm going through the results?
From the outset, I believe using a very long string will be more efficient than keep writing to a file but I am wondering whether PHP is going to have any issues with processing a very long string?
Thanks.