我有以下SimpleXML的循环条目
<entry>
<id></id>
<title></title>
<dc:identifier></dc:identifier>
<dc:identifier></dc:identifier>
<dc:relation></dc:relation>
<dc:publisher></dc:publisher>
<dc:language xsi:type="dcterms:ISO639-2"></dc:language>
<dcterms:issued></dcterms:issued>
<updated></updated>
<rights></rights>
<author>
<name></name>
<uri></uri>
</author>
<link rel="alternate" href="" type="text/html"/>
<link rel="http://opds-spec.org/image" href="" type="image/jpeg"/>
<link rel="http://opds-spec.org/image/thumbnail" href="" type="image/jpeg"/>
<link rel="http://opds-spec.org/acquisition/buy" href="" type="application/epub+zip">
<opds:price currencycode="EUR"></opds:price>
</link>
<summary type="text"></summary>
</entry>
<entry>
<id></id>
<title></title>
<dc:identifier></dc:identifier>
<dc:identifier></dc:identifier>
<dc:relation></dc:relation>
<dc:publisher></dc:publisher>
<dc:language xsi:type="dcterms:ISO639-2"></dc:language>
<dcterms:issued></dcterms:issued>
<updated></updated>
<rights></rights>
<author>
<name></name>
<uri></uri>
</author>
<link rel="alternate" href="" type="text/html"/>
<link rel="http://opds-spec.org/image" href="" type="image/jpeg"/>
<link rel="http://opds-spec.org/image/thumbnail" href="" type="image/jpeg"/>
<link rel="http://opds-spec.org/acquisition/buy" href="" type="application/epub+zip">
<opds:price currencycode="EUR"></opds:price>
</link>
<summary type="text"></summary>
</entry>
......
的XML解析所有(的SimpleXML)
现在我想在time.So拿到一个项目我路过一个变种,当我可以罚款解析它我的文件中像
file.php?start=1
file.php?start=2
etc
,我试图访问当前项目
$xml->entry[$start] returns NULL
OR
$xml->entry->{$start} returns NULL
但都返回NULL
我试图直接访问它
$xml->entry[1]
$xml->entry->{1}
其做工精细
我失去了somehthing?
感谢没有想到这个 – ntan 2011-12-19 07:04:25