Most of the time my clients need to download data from their database tables. Exporting to CSV is a pain in the rear for users and it leads to confusion (you know the colon and semicolon stuff). Today, I decided to make a very small controller that is portable and efficient for exporting full MySQL tables to Excel 2003 using PHPExcel and CodeIgniter.
It happened to me a lot of times, I had my connection set to UTF-8, my database was UTF-8, even my tables and every single field, however, for some reason, the information I updated in phpMyAdmin wasn’t being displayed correctly on my website and the information edited on my website wasn’t being displayed correctly in phpMyAdmin.
You know all those weird characters, those that very often come up when you write accented letters or words in another language like Portuguese or Spanish? That’s what I am talking about.
Here is the solution. A single line that can save you hours of research.