<?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
How to check if a given number is a perfect number. |
Write a PHP script that checks if a given string is a valid email address. |
Create a PHP script that calculates the average of an array of numbers. |
Write a PHP script that parses JSON data and displays specific information. |
how to get response status in api using curl php? |
Create a PHP script that processes a form submission and displays the submitted data. |
Write a PHP script that calculates the factorial of a given number. |
how to get country, state and city select option using google map api in php |