题
在PHP我想获得客户名称标签的文本值。我写这篇文章的代码,但是,这并不工作。你能帮我吗?谢谢
$customerName = $dom->get_elements_by_tagname("item");
$customernameValue = customerName[0]-> first_child()->node_value ();
没有正确的解决方案
其他提示
我不熟悉您使用的库,但它看起来像你只是错过了$第二行customerName
之前。
您错过一个$
标志,试试这个:
$customerName = $dom -> get_elements_by_tagname ("item");
$customernameValue = $customerName[0] -> first_child() -> node_value ();
不隶属于 StackOverflow