Answer the question
In order to leave comments, you need to log in
json_encode and file_get_contents php?
The question seems to be not difficult, I couldn’t find an example, help me figure it out, this script is on one server, I need to pick up json from another server, I see it through file_get_contents() , tell me in what form the file should be and how it is composed in that kind of accept it in your script?
$str = '{
"names":[
{"phrase": "Anga","name": "Angela"},
{"phrase": "Measure","name": "Merkel"},
{"phrase" : "Fufa","name": "Fufelina"},
{"phrase": "Tata","name": "Tatalina"},
{"phrase": "Zhenya","name": "Eugene"}
]
}';
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question