XMLの需要は、まだある。
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | // 連想配列をXMLに変換する function array_to_xml($array, &$xml) {   foreach($array as $key => $value) {     if(is_array($value)) {         if(!is_numeric($key)){             $subnode = $xml->addChild("$key");             $this->array_to_xml($value, $subnode);         } else {             $this->array_to_xml($value, $xml);         }     } else {         $xml->addAttribute("$key","$value");     }   } } | 
