<?php
$json_data = '{"name": "John", "age": 30, "city": "New York"}';
$data = json_decode($json_data, true);
echo "Name: " . $data['name'] . ", Age: " . $data['age'] . ", City: " . $data['city'];
?>
<?php
$json_data = '{"name": "John", "age": 30, "city": "New York"}';
$data = json_decode($json_data, true);
echo "Name: " . $data['name'] . ", Age: " . $data['age'] . ", City: " . $data['city'];
?>
Related
Write a PHP script that generates a random password of a specified length. |
Create a PHP script that calculates the average of an array of numbers. |
Create a PHP script that counts the number of occurrences of each word in a given sentence. |
how to get response status in api using curl php? |
Write a PHP script that connects to a MySQL database and fetches data from a table. |
Write a PHP script that calculates the factorial of a given number. |
Write a PHP script that calculates the factorial of a given number using an iterative approach. |
Write a PHP script that generates and displays a simple multiplication table for the numbers 1 to 5. |