<?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
Create a PHP script that processes a form submission and displays the submitted data. |
Write a PHP script that connects to a MySQL database and fetches data from a table. |
how to get current latitude and longitude using google map api in php? |
how to get country, state and city select option using google map api in php |
Write a PHP function to check if a given string is a palindrome |
How to show location using google map in JavaScript? |
Create a PHP script that checks whether a given number is a prime number or not. |
Write a PHP script that checks if a given string is a valid email address. |
