How can PHP be used to decode JSON data and access specific values?

To decode JSON data in PHP and access specific values, you can use the `json_decode()` function to convert the JSON string into a PHP array or object. Once decoded, you can then access specific values by using array or object notation to navigate through the data structure.

// Sample JSON data
$jsonData = '{"name": "John Doe", "age": 30, "city": "New York"}';

// Decode JSON data
$data = json_decode($jsonData);

// Access specific values
$name = $data->name;
$age = $data->age;
$city = $data->city;

// Output specific values
echo "Name: $name, Age: $age, City: $city";