Wenn Du den Inhalt aller XML-Dateien in einen einzigen DB-Eintrag speichern willst, musst Du die Daten zuerst sammeln (z.B. in einem Array). Mit implode() kannst Du anschliessend die einzelnen Array-Elemente verknüpfen.
PHP:
function get_files($_dir,$_filename_regex){
global $_dir_array, $_file_array;
$_scan = scandir($_dir);
foreach($_scan as $_value){
if(!preg_match('/^\.+$/',$_value)){
if(is_dir($_dir.'/'.$_value)) $_dir_array[] = $_dir.'/'.$_value;
elseif(preg_match($_filename_regex,$_value)) $_file_array[] = $_dir.'/'.$_value;
}
}
}
/*action after confirm*/
if(isset($_POST['eintragen'])){
// XML-Dateien suchen
$_start_dir = 'xml_video/';
$_dir_array = array($_start_dir);
$_file_array = array();
while(count($_dir_array) > 0) get_files(array_shift($_dir_array),'/^[^\.]+\.xml$/');
// XML-Dateien einlesen
$con_id = array();
$email = array();
$title = array();
$dvd = array();
$data = array();
foreach($_file_array as $file){
$content_batch = simplexml_load_file($file);
/*get content*/
$con_id[] = $content["id"];
$email[] = $content->email["address"];
$title[] = $content->title;
$dvd[] = $content->value;
$arr2 = array();
$aspects = $content->aspects->aspect;
for($i = 0; $i < 30; $i++) $arr2[] = $aspects[$i];
$data[] = implode(":", $arr2);
}
/*If the database has been updated*/
$_sql = "INSERT INTO db (con_id,email,title,dvd,aspects,added)
VALUES ('".implode('',$con_id)."','".implode('',$email)."',
'".implode('',$title)."','".implode('',$dvd)."',
'".implode('',$data)."',NOW())";
if(mysql_query($_sql))
echo "Daten wurden eingetragen!!<br /><br />";
else
echo "Daten wurden nicht eingetragen!!<br /><br />";
header("Refresh: 0; url=index.php");
}