How to break down the json, obtained from curl?

I use php curl to retrieve json data from http
, and then I use foreach array to display all the data
, but when I encounter a problem, how to break it down?
what kind of data does the counterparty need to give me?
for example, he has a total of 30 yuan
I want to do 10 times a week.

< hr >

charge

$data = array(
    "xxx" => "xxx"
  );
  $data_string = json_encode($data);
  $ch = curl_init($api);
  curl_setopt($ch, CURLOPT_POST, 1);
  curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
  curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($ch, CURLOPT_HTTPHEADER, array(
      "Content-Type: application/json",
      "Content-Length: " . strlen($data_string))
  );
  curl_setopt($ch, CURLOPT_TIMEOUT, 5);
  curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);
  $result = curl_exec($ch);
  curl_close($ch);
  $data = json_decode($result);

suppose that I use foreach to print out all the data
how to make a score?

foreach ($data->orders as $order) {
}
Feb.27,2021

the subdivision method should be defined by the provider
you need to ask the corresponding subdivision concatenation method


split the crawled data. If it is array, you can use

.
:array_slice($list, 0, 10)
:array_slice($list, 10, 10)
:array_slice($list, 20, 10)

$page = 1;
$size = 10;
$data = array_slice($list, ($page-1)*$size, $size);
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b31083-2bd44.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b31083-2bd44.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?