<?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 get current lat and lng from ip address using google map api in php? |
How to reverses a given string using PHP. |
How to check if a given number is a perfect number. |
Write a PHP script that sets a cookie with user preferences and retrieves it on subsequent visits. |
Create a simple PHP script that calculates the sum of all even numbers between 1 and 10. |
How to get the largest element in an array of numbers |
Write a PHP script that calculates the factorial of a given number using an iterative approach. |
Create a PHP script that calculates the average of an array of numbers. |