What causes this error in my code?
$query = $this->db->query(\"SELECT * FROM tour_foreign ORDER BY id desc\"); $data = array(); foreach ($q
I think you want json_encode, not json_decode.