phpテーブルをxml形式に導く
782 ワード
public function structureDirectoryXml(){
$strXml='';
if(!empty($_GET['id'])){
$this->load->dbutil();
$directory=$this->db->query('select * from course_directory where course_id='.$_GET['id']);
$config = array (
'root' => 'directory',
'element' => 'item',
'newline' => "
",
'tab' => "\t"
);
}
$strXml.=$this->dbutil->xml_from_result($directory,$config);
return $strXml;
}