Answer the question
In order to leave comments, you need to log in
How to implement articles.json so that the latest articles are added to this file?
How to implement articles.json so that the latest articles are added to this file?
How to make it output an array and the body of this array, when news is added to the database, automatically updated to the place: id name, etc.? Help who knows, thanks in advance !!! Array example :
"feed": [
{
"id": 1,
"name": "National Geographic Channel",
"image": " someaddress.com/feed/img/cosmos.jpg ",
"status": "\" Science is a beautiful and emotional human endeavor,\" says Brannon Braga, executive producer and director. \"And Cosmos is all about making science an experience.\"",
"
"timeStamp": "1403375851930",
"url": null
}
Answer the question
In order to leave comments, you need to log in
file get contents
json decode
array[] = article
json encode
file put contents
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question