FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Send .csv file to browser
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Send .csv file to browser [message #170005 is a reply to message #170004] Tue, 05 October 2010 14:55 Go to previous messageGo to previous message
sheldonlg is currently offline  sheldonlg
Messages: 166
Registered: September 2010
Karma:
Senior Member
On 10/5/2010 10:20 AM, Derek Turner wrote:
> On Tue, 05 Oct 2010 14:19:04 +0000, Derek Turner wrote:
>
>
>>
>> 3. Use appropriate header files and then readfile()
>
> Sorry lines/statements

Why not simply

$theData = getDataFromTableAsArrayOfNonAssociativeArrays();
foreach ($theData as $rec) {
$line = implode(',', $rec);
print $line . '<br>';
}

The user can then cut and paste it into a file or you can put in code
for the user to download that piece.

Another approach is to output an Excel file and the user can then output
from that Excel file to a .csv file.


--
Shelly
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: file access permission?
Next Topic: Process queue without cron jobs
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat Nov 30 09:29:03 GMT 2024

Total time taken to generate the page: 0.04409 seconds