I have several xml files in a folder on my webserver. I want to 1. look in the folder 2. get xml file names 3. put file names into array 4. loop those names into a mysql query 5. have contents of all xml files inserted into db
$files = glob('*.xml');
foreach($files as $file){
mysql_query("LOAD DATA INFILE '".$file."' INTO TABLE tablename ROWS IDENTIFIED BY ''");
}
I've spent a couple of days looking for an example or tutorial but can't find anything online. Above is the best I can come up with. Any help appreciated