【发布时间】:2013-07-27 04:03:21
【问题描述】:
我需要你的帮助。我需要一个打开“full.xml”的 PHP 脚本
并且仅显示具有 .email
我想要的输出示例:
sales@company1.com
sales@company2.com
sales@company3.com
谢谢!我会非常感谢你!
编辑
$Connect = simplexml_load_file("full.xml");
return $Connect->table[0]->*.email;
【问题讨论】:
-
请向我们展示您尝试过的代码,我们将尽我们所能提供帮助。这是一个很好的起点:php.net/manual/en/class.xmlreader.php
-
我试过了:$Connect = simplexml_load_file("full.xml"); return $Connect->table[0]->*.email;
-
结果如何?
-
它什么都不知道。
-
但这:$Connect = simplexml_load_file("full.xml");返回 $Connect->table[0]->company1.email;此脚本:显示:sales@company1.com