...Beauty, cleaning, DIY tips and more - free to join!
   Login   Contact us   Site map   Puzzle Club   Ask a question    Newsletter

How To Export To Excel With PHP

Computing : Learning PHP

If you want to give people an export to Excel option in your PHP programs, then it can be really quite simple.

What you need to do first is to ensure that all the content to be exported is comma separated.

If it is data from a database then this is trivial to do - just run a loop through each relevant record or row in the database and comma separate.

The trick then is that the first thing to be sent from the PHP program is the header showing that the item is an Excel file. Otherwise the comma separated list will just be dumped to the screen. Once you have the header in place, it's job done!


By: Stephen

Share on Facebook: On Twitter: TwitterTweet this!

  Reply to How To Export To Excel With PHP

  Receive Our Newsletter




Questions about learn PHP:

Ask question

More Articles:
Search engines to target
How to create search engine friendly content
How to use chatrooms safely