curl->simple_get json - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Development (https://forum.codeigniter.com/forumdisplay.php?fid=6) +--- Forum: CodeIgniter 3.x (https://forum.codeigniter.com/forumdisplay.php?fid=17) +--- Thread: curl->simple_get json (/showthread.php?tid=85233) |
curl->simple_get json - momokaze - 12-07-2022 I have proble using curl simple_get when trying to get json, it always return bool(false) when I tried the api address in browser, they works just fine Code: public function test_curl() RE: curl->simple_get json - InsiteFX - 12-09-2022 PHP Code: json_decode( associative When true, JSON objects will be returned as associative arrays; when false, JSON objects will be returned as objects. When null, JSON objects will be returned as associative arrays or objects depending on whether JSON_OBJECT_AS_ARRAY is set in the flags. PHP Code: // your missing true for the associated array flag. |