<?php require_once 'curl.func.php'; $appkey = 'your_appkey_here';//你的appkey $url = "https://api.jisuapi.com/parts/brand?appkey=$appkey"; $result = curlOpen($url, ['ssl'=>true]); $jsonarr = json_decode($result, true); //exit(var_dump($jsonarr)); if($jsonarr['status'] != 0) { echo $jsonarr['msg']; exit(); } $result = $jsonarr['result']; ; foreach($result['0'] as $key=>$val) { echo $val['brandid'].' '.$val['name'].' '.$val['initial']; } foreach($result['1'] as $key=>$val) { echo $val['brandid'].' '.$val['name'].' '.$val['initial']; } foreach($result['2'] as $key=>$val) { echo $val['brandid'].' '.$val['name'].' '.$val['initial']; } foreach($result['3'] as $key=>$val) { echo $val['brandid'].' '.$val['name'].' '.$val['initial']; } foreach($result['4'] as $key=>$val) { echo $val['brandid'].' '.$val['name'].' '.$val['initial']; } foreach($result['5'] as $key=>$val) { echo $val['brandid'].' '.$val['name'].' '.$val['initial']; } foreach($result['6'] as $key=>$val) { echo $val['brandid'].' '.$val['name'].' '.$val['initial']; } foreach($result['7'] as $key=>$val) { echo $val['brandid'].' '.$val['name'].' '.$val['initial']; } foreach($result['8'] as $key=>$val) { echo $val['brandid'].' '.$val['name'].' '.$val['initial']; } foreach($result['9'] as $key=>$val) { echo $val['brandid'].' '.$val['name'].' '.$val['initial']; } foreach($result['10'] as $key=>$val) { echo $val['brandid'].' '.$val['name'].' '.$val['initial']; } foreach($result['11'] as $key=>$val) { echo $val['brandid'].' '.$val['name'].' '.$val['initial']; } foreach($result['12'] as $key=>$val) { echo $val['brandid'].' '.$val['name'].' '.$val['initial']; }