2

When I take out my "note" column in my SQL select it converts it to a json array but when I add it back in I get no echo at all - the note column can be up to 500 characters.

After my query I do this :

header('Content-Type: application/json');
var_dump($arrResult);
echo json_encode($arrResult); 

the json_encode($arrResult) is blank but the $arrResult is :

array(3) {
  [0]=>
  array(3) {
    ["ref"]=>
    string(5) "12291"
    ["user"]=>
    string(11) "H.a"
    ["note"]=>
    string(639) "Dear Mrs s

Further to your phone callblabal"
  }
  [1]=>
  array(3) {
    ["ref"]=>
    string(5) "11369"
    ["user"]=>
    string(10) "sss"
    ["note"]=>
    string(39) "VM left IP"
  }
  [2]=>
  array(3) {
    ["ref"]=>
    string(5) "12101"
    ["user"]=>
    string(6) "K.Holt"
    ["note"]=>
    string(159) "<div>Spoke with client</div>"
  }
}

Is there some kind of restriction?

Since it breaks on 3 I am thinking something to do with <div>?

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
G.Smith
  • 141
  • 11

0 Answers0