How can you access child nodes in a JSON array in PHP?

When working with a JSON array in PHP, you can access child nodes by decoding the JSON string into an associative array using the `json_decode()` function. Once you have the array, you can access the child nodes by specifying the key of the parent node followed by the key of the child node.

// Sample JSON data
$jsonData = '{"parent": {"child1": "value1", "child2": "value2"}}';

// Decode the JSON data into an associative array
$arrayData = json_decode($jsonData, true);

// Access child nodes
$child1Value = $arrayData['parent']['child1'];
$child2Value = $arrayData['parent']['child2'];

// Output the values
echo $child1Value; // Output: value1
echo $child2Value; // Output: value2