What causes this error in my code?
$query = $this->db->query(\"SELECT * FROM tour_foreign ORDER BY id desc\");
$data = array();
foreach ($q
Ok I was running into the same issue. What I failed to notice is that I was using json_decode() instead of using json_encode() so for those who are going to come here please make sure you are using the right function, which is json_encode()
Note: Depends on what you are working on but make sure you are using the right function.