<?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 calculates the average of an array of numbers. |
How to check if a given number is a perfect number. |
How to check whether a given year is a leap year using php. |
How to reverses a given string using PHP. |
Write a PHP function that throws a custom exception if a condition is not met. |
Create a PHP function to count the number of vowels in a string. |
how to get response status in api using curl php? |
Create a PHP script that counts the number of occurrences of each word in a given sentence. |
