- Cod:
<PHP>createElement($table);
$doc->appendChild($root);
while($row=mysql_fetch_assoc($result)){
$occ=$doc->createElement('record');
$root->appendChild($occ);
foreach($row as $fieldname => $fieldvalue){
$child=$doc->createElement($fieldname);
$occ->appendChild($child);
$fieldvalue=mb_convert_encoding($fieldvalue,'UTF-8','ISO-8859-1');
$value=$doc->createTextNode($fieldvalue);
$child->appendChild($value);
}
}
$doc->save($table.'.xml');
header("Location:".$table.".xml");
?>
[PHP]Export date MySQL->XML
CYobY- Administrator
- Mesaje : 197
Data de inscriere : 04/10/2009
Varsta : 30
Localizare : VASLUI
- Mesaj n°1
[PHP]Export date MySQL->XML
|
|