Getting FALSE when downloading text from a query

Topics: Developer Forum, User Forum
Feb 25, 2016 at 6:39 PM
Edited Feb 26, 2016 at 4:33 PM
I am pulling in data from a mysql query and populating a spreadsheet. Everything seems to work well except I notice on one of the fields that I import, when the data comes in to the spreadsheet sometimes I only get FALSE as the data, and not the text data. I did some troubleshooting and it looks like when folks have put in characters like -, "", that is when the information comes in as FALSE. I know this because I have taken out some of those characters in the text and sub-stringed the text and all the text comes in until I sub-string to the next special character in which case I get FALSE again. I saw some threads about utf-8 so for my code I put in the following:

if ($mysqli->multi_query($sql1)){
do {
  if ($result = $mysqli->store_result()){
      $titlerow = $result->fetch_row();
but that did not see to make a difference. I then tried to add the utf-8 to the header:

header('Content-Type:application/; charset=utf-8');

and this did not help. How do I get PHP to pull in the text as just a string? I even made sure my db was utf-8 which it is.

Sorry, forgot to mention we are on PHP version 5.5.9, PHPExcel version 1.8.

Thanks for any insight to this.