Does php compare the square value through curl? The opposite party also uses curl

should mean
I have written an api
I want to list all the data of a certain table
and then let the counterparty access
but through php curl

.

what am I supposed to do?
what should I do with the other side?

I am stuck in array
because my company will produce array
the counterpart also needs to use array
two big gods

clipboard.png

it doesn"t seem to print well in this way

Mar.05,2021

I don't know how the graph data in your question comes from

if someone calls your interface, no matter how it is called, you only need to agree on the format type to be returned.
generally return data in json or xml format
and then call the interface to parse your returned data and then use it

.

then back to the point, if someone else calls your interface, then you only need to return the data in json format. Your array data is converted to json through json_encode . The caller can parse your json data into an array through json_decode ($json, true) ).

Whether

array or object, these are the data structure implementations of specific languages. When you do the "contract" thing, you only need to pay attention to whether the character format used for network transmission is JSON or XML. The specific local language will translate JSON into what structure, just make sure that the JSON format is legal and can be used by both of you.


try processing your data this way.

$string = '{"errno": "1","errstr":"2"}{"errno": "1","errstr":"2"}';
$string = '['.str_replace('}{','},{', $string).']';
var_dump(json_decode($string,true));
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-1b36b38-2c018.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-1b36b38-2c018.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?