我已将此代码放入我得到所有正确的 products_id 但所有 products_model 都是相同的数字
foreach($xml->xpath('//PRODUCT/@ITEM') as $productitemid){
foreach($xml->CREATED->CATEGORY->PRODUCT as $product)
mysql_query("INSERT INTO products (products_id,products_model) VALUES ('$productitemid','$product->MODEL')");
}