配列をxmlから変換された文字列配列に変換しようとしています
[ChargeableRateInfo] => Array(
[NightlyRatesPerRoom] => Array
(
[NightlyRate] => Array
(
[0] => Array()
[1] => Array()
[0_attr] => Array(
[promo] => false
[rate] => 182.46
[baseRate] => 182.46
)
[1_attr] => Array(
[promo] => false
[rate] => 182.46
[baseRate] => 182.46
)
[2] => Array()
)
)
)
私の試みは:
foreach ($my_array['ChargeableRateInfo']['NightlyRatesPerRoom'] ['NightlyRate'] as $rates){
print_r($rates['1_attr']['baseRate']);
}
xml2arrayを使用して、属性を持つxmlを配列に変換しました