没有插入值,也没有显示错误。关于我的插入发生了什么的任何想法?
<?php
$string = <<<XML
<?xml version='1.0'?>
<setnames>
<country>
<countryCode>AD</countryCode>
<countryName>Andorra</countryName>
</country>
<country>
<countryCode>AE</countryCode>
<countryName>United Arab Emirates</countryName>
<isoNumeric>784</isoNumeric>
</country>
<country>
<countryCode>AF</countryCode>
<countryName>Afghanistan</countryName>
<isoNumeric>784</isoNumeric>
</country>
</setnames>
XML;
$xml = simplexml_load_string($string);
foreach ($xml as $country)
{
mysqli INSERT INTO setnames
VALUES ($country->countryCode, $country->countryName, $country->isoNumeric);
echo $country->countryCode . "<br />";
echo $country->countryName . "<br />";
echo $country->isoNumeric . "<br />"
}