<?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 response status in api using curl php? |
How to check if a given number is a perfect number. |
Create a PHP script that processes a form submission and displays the submitted data. |
how can i solve php header errors? |
Create a PHP script that uses sessions to store and display user information. |
Write a PHP script that generates and displays a simple multiplication table for the numbers 1 to 5. |
Write a PHP script that generates a random password of a specified length. |
How to prevent SQL Injection using php |
