<?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 prints the current date and time. |
Write a PHP script that parses JSON data and displays specific information. |
Create a PHP function to count the number of vowels in a string. |
Write a PHP script that checks if a given string is a valid email address. |
Create a PHP script that checks whether a given number is a prime number or not. |
Create a PHP script that uses sessions to store and display user information. |
Create a PHP script that calculates and displays the area of a rectangle given its length and width. |
How to check if a given number is a perfect number. |
