Write a PHP program that will generate the JSON structure below

Joined
Jul 21, 2022
Messages
2
Reaction score
0
First Step: Write a PHP program that will generate the JSON structure below.
Second Step: Write a JAVASCRIPT program that will parse the JSON structure once the PHP program is
called using AJAX. You may show your output on the body of the HTML document or in the console.
Problem #1. Billing Information
{
"client-data ":
{
"account-num":123456789012,
"balance":100,
"billing-info":
{
"first-name":"Matthew",
"last-name":"Cousens",
"addr-street":"2455 South Rd",
"addr-city":"Poughkeepsie",
"addr-region":"New York",
"addr-code":"12601"
}
}
}
 
Joined
Mar 11, 2022
Messages
226
Reaction score
32
Have a look at PHP's json_decode and json_encode and all your questions are answered.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,979
Messages
2,570,185
Members
46,728
Latest member
FernMcmull

Latest Threads

Top