How can one access nested arrays within an associative array in PHP?

To access nested arrays within an associative array in PHP, you can use multiple square brackets to navigate through the nested levels. For example, if you have an associative array $data with a nested array within it, you can access the nested array by chaining square brackets like $data['key']['nested_key'].

$data = array(
    'key' => array(
        'nested_key' => 'value'
    )
);

echo $data['key']['nested_key']; // Output: value