-4

I am new To JSON creation. Can you please suggest PHP MYSQL Code to create JSON like this

 {
        "total": 115,
        "data": [{
            "id": 11,
            "quote": "Give a man a program, frustrate him for a day.",
            "author": "Muhammad Waseem"
        }
          ]
    }

Regards, Satish

user3783243
  • 5,368
  • 5
  • 22
  • 41
sathish kumar
  • 1,061
  • 6
  • 16
  • 31
  • Let me suggest you to make yourself familiar with google Search. It does wonders. – Your Common Sense Aug 20 '23 at 14:30
  • Are you trying to output that data, store it, display it like that? Add some context to question and share what you have tried/where your issue(s) are. – user3783243 Aug 20 '23 at 14:35
  • Look up the json_encode() function. Beyond that it is unclear where you might be stuck, or what you expect us to suggest, since you did not share any code, told us nothing about the source data or its structure, did not present a problem statement and gave no indication of any prior research effort or attempts of your own. We are not mind readers and we are also not a free write-my-code or do-my-thinking service. Good questions tend to get good answers. Poor questions get closed. I suggest reading [ask] before trying again. Thanks – ADyson Aug 20 '23 at 17:14
  • P.s. you really have enough reputation points and a history of well-received questions to have realised this was not a good-quality question. It's surprising it was posted. – ADyson Aug 20 '23 at 17:16

0 Answers0