Hallo
ich steh wiedermal auf dem Schlauch...
Ich möchte anstatt aus einer DB wie hier:
Code:
$result = mysql_query("SELECT * FROM gallery ORDER BY id DESC",$connect);
$num = mysql_num_rows($result);
if ($num != 0) {
$file= fopen("../images.xml" , "w");
$_xml ="<?xml version=\"1.0\" encoding=\"utf-8\" ?>\r\n";
$_xml .="<gallery>\r\n";
function gf($string)
{
return '"'.$string.'"';
}
while ($row = mysql_fetch_array($result)) {
$_xml .=" <image path=" . gf($row[imagepath]) ; //image path="
$_xml .=" thumb=" . gf($row[thumb]) ; //" thumb="
$_xml .=" captions=" . gf($row[captions]) . "/>\r\n";//" captions="
}
$_xml .="</gallery>";
fwrite($file, $_xml); /
fclose($file);
Direkt aus zwei Ordner ("images" und "thumbs") die Bilder auslesen und als XML speichern.
Wie mache ich das ich die gleiche XML Struktur wie oben erhalte ???
Weiss jemand Rat ???[/code]