💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
## 以下值: ``` object(think\response\Json)#39 (8) { ["options"] => array(1) { ["json_encode_param"] => int(256) } ["contentType"] => string(16) "application/json" ["data"] => string(110) "[{"id":22,"username":"sdfsddf","vip":"323","money":233},{"id":23,"username":"fsdsd","vip":"434","money":4344}]" ["charset"] => string(5) "utf-8" ["code"] => bool(true) ["allowCache"] => bool(true) ["header"] => array(1) { ["Content-Type"] => string(31) "application/json; charset=utf-8" } ["content"] => NULL ``` # 用封装的这个函数转成字符串JSON数组 ~~~ function objarry($obj) { if(is_object($obj)) { $obj = (array)$obj; $obj = $this->ob2ar($obj); } elseif(is_array($obj)) { foreach($obj as $key => $value) { $obj[$key] = $this->ob2ar($value); } } return $obj; } ~~~ ~~~ json_decode(,true) 转成数组 ~~~